diff --git a/packages/react-native/Libraries/Animated/shouldUseTurboAnimatedModule.js b/packages/react-native/Libraries/Animated/shouldUseTurboAnimatedModule.js index 2758cc734699..beebd3b33660 100644 --- a/packages/react-native/Libraries/Animated/shouldUseTurboAnimatedModule.js +++ b/packages/react-native/Libraries/Animated/shouldUseTurboAnimatedModule.js @@ -15,7 +15,7 @@ function shouldUseTurboAnimatedModule(): boolean { if (ReactNativeFeatureFlags.cxxNativeAnimatedEnabled()) { return false; } else { - return Platform.OS === 'ios' && global.RN$Bridgeless === true; + return Platform.OS === 'ios'; } } diff --git a/packages/react-native/Libraries/BatchedBridge/MessageQueue.js b/packages/react-native/Libraries/BatchedBridge/MessageQueue.js index 137233be1dfa..7a6457584d0a 100644 --- a/packages/react-native/Libraries/BatchedBridge/MessageQueue.js +++ b/packages/react-native/Libraries/BatchedBridge/MessageQueue.js @@ -417,12 +417,9 @@ class MessageQueue { const n = callableModuleNames.length; const callableModuleNameList = callableModuleNames.join(', '); - // TODO(T122225939): Remove after investigation: Why are we getting to this line in bridgeless mode? - const isBridgelessMode = - global.RN$Bridgeless === true ? 'true' : 'false'; invariant( false, - `Failed to call into JavaScript module method ${module}.${method}(). Module has not been registered as callable. Bridgeless Mode: ${isBridgelessMode}. Registered callable JavaScript modules (n = ${n}): ${callableModuleNameList}. + `Failed to call into JavaScript module method ${module}.${method}(). Module has not been registered as callable. Registered callable JavaScript modules (n = ${n}): ${callableModuleNameList}. A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.`, ); } diff --git a/packages/react-native/Libraries/Core/registerCallableModule.js b/packages/react-native/Libraries/Core/registerCallableModule.js index 0a0951c40f07..4c54051c2efd 100644 --- a/packages/react-native/Libraries/Core/registerCallableModule.js +++ b/packages/react-native/Libraries/Core/registerCallableModule.js @@ -16,27 +16,16 @@ type RegisterCallableModule = ( moduleOrFactory: Module | (void => Module), ) => void; -const registerCallableModule: RegisterCallableModule = (function () { - if (global.RN$Bridgeless === true) { - return (name, moduleOrFactory) => { - if (typeof moduleOrFactory === 'function') { - global.RN$registerCallableModule(name, moduleOrFactory); - return; - } - - global.RN$registerCallableModule(name, () => moduleOrFactory); - }; +const registerCallableModule: RegisterCallableModule = ( + name, + moduleOrFactory, +) => { + if (typeof moduleOrFactory === 'function') { + global.RN$registerCallableModule(name, moduleOrFactory); + return; } - const BatchedBridge = require('../BatchedBridge/BatchedBridge').default; - return (name, moduleOrFactory) => { - if (typeof moduleOrFactory === 'function') { - BatchedBridge.registerLazyCallableModule(name, moduleOrFactory); - return; - } - - BatchedBridge.registerCallableModule(name, moduleOrFactory); - }; -})(); + global.RN$registerCallableModule(name, () => moduleOrFactory); +}; export default registerCallableModule; diff --git a/packages/react-native/Libraries/Core/setUpBatchedBridge.js b/packages/react-native/Libraries/Core/setUpBatchedBridge.js index 1cda1d458623..a202c7ded079 100644 --- a/packages/react-native/Libraries/Core/setUpBatchedBridge.js +++ b/packages/react-native/Libraries/Core/setUpBatchedBridge.js @@ -13,9 +13,6 @@ import registerModule from './registerCallableModule'; registerModule('Systrace', () => require('../Performance/Systrace')); -if (!(global.RN$Bridgeless === true)) { - registerModule('JSTimers', () => require('./Timers/JSTimers').default); -} registerModule('RCTLog', () => require('../Utilities/RCTLog').default); registerModule( 'RCTDeviceEventEmitter', diff --git a/packages/react-native/Libraries/Core/setUpTimers.js b/packages/react-native/Libraries/Core/setUpTimers.js index db8baa3e0587..d7a9e87921e0 100644 --- a/packages/react-native/Libraries/Core/setUpTimers.js +++ b/packages/react-native/Libraries/Core/setUpTimers.js @@ -19,86 +19,40 @@ if (__DEV__) { } // In bridgeless mode, timers are host functions installed from cpp. -if (global.RN$Bridgeless === true) { - // This is the flag that tells React to use `queueMicrotask` to batch state - // updates, instead of using the scheduler to schedule a regular task. - // We use a global variable because we don't currently have any other - // mechanism to pass feature flags from RN to React in OSS. - global.RN$enableMicrotasksInReact = true; - - polyfillGlobal( - 'queueMicrotask', - () => - require('../../src/private/webapis/microtasks/specs/NativeMicrotasks') - .default.queueMicrotask, - ); - - // We shim the immediate APIs via `queueMicrotask` to maintain the backward - // compatibility. - polyfillGlobal( - 'setImmediate', - () => require('./Timers/immediateShim').setImmediate, - ); - polyfillGlobal( - 'clearImmediate', - () => require('./Timers/immediateShim').clearImmediate, - ); - - polyfillGlobal( - 'requestIdleCallback', - () => - require('../../src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks') - .default.requestIdleCallback, - ); - - polyfillGlobal( - 'cancelIdleCallback', - () => - require('../../src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks') - .default.cancelIdleCallback, - ); -} else { - /** - * Set up timers. - * You can use this module directly, or just require InitializeCore. - */ - const defineLazyTimer = ( - name: - | 'cancelAnimationFrame' - | 'cancelIdleCallback' - | 'clearInterval' - | 'clearTimeout' - | 'requestAnimationFrame' - | 'requestIdleCallback' - | 'setInterval' - | 'setTimeout', - ) => { - polyfillGlobal(name, () => require('./Timers/JSTimers').default[name]); - }; - defineLazyTimer('setTimeout'); - defineLazyTimer('clearTimeout'); - defineLazyTimer('setInterval'); - defineLazyTimer('clearInterval'); - defineLazyTimer('requestAnimationFrame'); - defineLazyTimer('cancelAnimationFrame'); - defineLazyTimer('requestIdleCallback'); - defineLazyTimer('cancelIdleCallback'); - - // Polyfill it with promise (regardless it's polyfilled or native) otherwise. - polyfillGlobal( - 'queueMicrotask', - () => require('./Timers/queueMicrotask.js').default, - ); - - // When promise was polyfilled hence is queued to the RN microtask queue, - // we polyfill the immediate APIs as aliases to the ReactNativeMicrotask APIs. - // Note that in bridgeless mode, immediate APIs are installed from cpp. - polyfillGlobal( - 'setImmediate', - () => require('./Timers/JSTimers').default.queueReactNativeMicrotask, - ); - polyfillGlobal( - 'clearImmediate', - () => require('./Timers/JSTimers').default.clearReactNativeMicrotask, - ); -} +// This is the flag that tells React to use `queueMicrotask` to batch state +// updates, instead of using the scheduler to schedule a regular task. +// We use a global variable because we don't currently have any other +// mechanism to pass feature flags from RN to React in OSS. +global.RN$enableMicrotasksInReact = true; + +polyfillGlobal( + 'queueMicrotask', + () => + require('../../src/private/webapis/microtasks/specs/NativeMicrotasks') + .default.queueMicrotask, +); + +// We shim the immediate APIs via `queueMicrotask` to maintain the backward +// compatibility. +polyfillGlobal( + 'setImmediate', + () => require('./Timers/immediateShim').setImmediate, +); +polyfillGlobal( + 'clearImmediate', + () => require('./Timers/immediateShim').clearImmediate, +); + +polyfillGlobal( + 'requestIdleCallback', + () => + require('../../src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks') + .default.requestIdleCallback, +); + +polyfillGlobal( + 'cancelIdleCallback', + () => + require('../../src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks') + .default.cancelIdleCallback, +); diff --git a/packages/react-native/Libraries/NativeComponent/NativeComponentRegistry.js b/packages/react-native/Libraries/NativeComponent/NativeComponentRegistry.js index deedfb009041..a1d9c5c83e65 100644 --- a/packages/react-native/Libraries/NativeComponent/NativeComponentRegistry.js +++ b/packages/react-native/Libraries/NativeComponent/NativeComponentRegistry.js @@ -54,7 +54,7 @@ export function get( ): HostComponent { ReactNativeViewConfigRegistry.register(name, () => { const {native, verify} = getRuntimeConfig?.(name) ?? { - native: !global.RN$Bridgeless, + native: false, verify: false, }; diff --git a/packages/react-native/Libraries/ReactNative/UIManager.js b/packages/react-native/Libraries/ReactNative/UIManager.js index 3d2729530286..a29ccdfd76ae 100644 --- a/packages/react-native/Libraries/ReactNative/UIManager.js +++ b/packages/react-native/Libraries/ReactNative/UIManager.js @@ -13,16 +13,14 @@ import type {UIManagerJSInterface} from '../Types/UIManagerJSInterface'; import {getFabricUIManager} from './FabricUIManager'; import nullthrows from 'nullthrows'; +const UIManagerImpl: UIManagerJSInterface = + require('./BridgelessUIManager').default; + function isFabricReactTag(reactTag: number): boolean { // React reserves even numbers for Fabric. return reactTag % 2 === 0; } -const UIManagerImpl: UIManagerJSInterface = - global.RN$Bridgeless === true - ? require('./BridgelessUIManager').default - : require('./PaperUIManager').default; - // $FlowFixMe[cannot-spread-interface] const UIManager: UIManagerJSInterface = { ...UIManagerImpl, diff --git a/packages/react-native/Libraries/Text/TextNativeComponent.js b/packages/react-native/Libraries/Text/TextNativeComponent.js index 11c869113337..d7d96fc48e42 100644 --- a/packages/react-native/Libraries/Text/TextNativeComponent.js +++ b/packages/react-native/Libraries/Text/TextNativeComponent.js @@ -15,7 +15,6 @@ import type {TextProps} from './TextProps'; import {enablePreparedTextLayout} from '../../src/private/featureflags/ReactNativeFeatureFlags'; import {createViewConfig} from '../NativeComponent/ViewConfig'; -import UIManager from '../ReactNative/UIManager'; import createReactNativeComponentClass from '../Renderer/shims/createReactNativeComponentClass'; export type NativeTextProps = Readonly<{ @@ -82,11 +81,9 @@ export const NativeText: HostComponent = ) as any; export const NativeVirtualText: HostComponent = - !global.RN$Bridgeless && !UIManager.hasViewManagerConfig('RCTVirtualText') - ? NativeText - : (createReactNativeComponentClass('RCTVirtualText', () => - createViewConfig(virtualTextViewConfig), - ) as any); + createReactNativeComponentClass('RCTVirtualText', () => + createViewConfig(virtualTextViewConfig), + ) as any; export const NativeSelectableText: HostComponent = enablePreparedTextLayout() diff --git a/packages/react-native/Libraries/Utilities/__tests__/codegenNativeComponent-test.js b/packages/react-native/Libraries/Utilities/__tests__/codegenNativeComponent-test.js index da098b463c6e..28cf073020f8 100644 --- a/packages/react-native/Libraries/Utilities/__tests__/codegenNativeComponent-test.js +++ b/packages/react-native/Libraries/Utilities/__tests__/codegenNativeComponent-test.js @@ -31,8 +31,6 @@ jest describe('codegenNativeComponent', () => { beforeEach(() => { jest.restoreAllMocks(); - // $FlowExpectedError[cannot-write] - global.RN$Bridgeless = false; jest.spyOn(console, 'warn').mockImplementation(() => {}); }); @@ -75,16 +73,7 @@ describe('codegenNativeComponent', () => { ); }); - it('should NOT warn if called directly in BRIDGE mode', () => { - // $FlowExpectedError[cannot-write] - global.RN$Bridgeless = false; - codegenNativeComponent<$FlowFixMe>('ComponentName'); - expect(console.warn).not.toHaveBeenCalled(); - }); - - it('should warn if called directly in BRIDGELESS mode', () => { - // $FlowExpectedError[cannot-write] - global.RN$Bridgeless = true; + it('should warn if called directly', () => { codegenNativeComponent<$FlowFixMe>('ComponentName'); expect(console.warn).toHaveBeenCalledWith( `Codegen didn't run for ComponentName. This will be an error in the future. Make sure you are using @react-native/babel-preset when building your JavaScript code.`, diff --git a/packages/react-native/Libraries/Utilities/codegenNativeComponent.js b/packages/react-native/Libraries/Utilities/codegenNativeComponent.js index cb5ece90df68..8cb10deb5d7f 100644 --- a/packages/react-native/Libraries/Utilities/codegenNativeComponent.js +++ b/packages/react-native/Libraries/Utilities/codegenNativeComponent.js @@ -35,7 +35,7 @@ function codegenNativeComponent( componentName: string, options?: NativeComponentOptions, ): NativeComponentType { - if (global.RN$Bridgeless === true && __DEV__) { + if (__DEV__) { console.warn( `Codegen didn't run for ${componentName}. This will be an error in the future. Make sure you are using @react-native/babel-preset when building your JavaScript code.`, ); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.kt index 48202e177a09..413b39f1f656 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.kt @@ -17,7 +17,6 @@ import android.os.PowerManager import android.os.PowerManager.WakeLock import com.facebook.react.bridge.ReactContext import com.facebook.react.bridge.UiThreadUtil -import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags import com.facebook.react.jstasks.HeadlessJsTaskConfig import com.facebook.react.jstasks.HeadlessJsTaskContext.Companion.getInstance import com.facebook.react.jstasks.HeadlessJsTaskEventListener @@ -126,40 +125,21 @@ public abstract class HeadlessJsTaskService : Service(), HeadlessJsTaskEventList protected val reactContext: ReactContext? get() { - if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()) { - val reactHost = - checkNotNull(reactHost) { "ReactHost is not initialized in New Architecture" } - return reactHost.currentReactContext - } else { - val reactInstanceManager = reactNativeHost.reactInstanceManager - return reactInstanceManager.currentReactContext - } + val reactHost = checkNotNull(reactHost) { "ReactHost is not initialized in New Architecture" } + return reactHost.currentReactContext } private fun createReactContextAndScheduleTask(taskConfig: HeadlessJsTaskConfig) { - if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()) { - val reactHost = checkNotNull(reactHost) - reactHost.addReactInstanceEventListener( - object : ReactInstanceEventListener { - override fun onReactContextInitialized(context: ReactContext) { - invokeStartTask(context, taskConfig) - reactHost.removeReactInstanceEventListener(this) - } - } - ) - reactHost.start() - } else { - val reactInstanceManager = reactNativeHost.reactInstanceManager - reactInstanceManager.addReactInstanceEventListener( - object : ReactInstanceEventListener { - override fun onReactContextInitialized(context: ReactContext) { - invokeStartTask(context, taskConfig) - reactInstanceManager.removeReactInstanceEventListener(this) - } + val reactHost = checkNotNull(reactHost) + reactHost.addReactInstanceEventListener( + object : ReactInstanceEventListener { + override fun onReactContextInitialized(context: ReactContext) { + invokeStartTask(context, taskConfig) + reactHost.removeReactInstanceEventListener(this) } - ) - reactInstanceManager.createReactContextInBackground() - } + } + ) + reactHost.start() } public companion object { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java index 16d44fe4c54a..b53280e2ba5d 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java @@ -23,7 +23,6 @@ import com.facebook.react.bridge.ReactContext; import com.facebook.react.common.LifecycleState; import com.facebook.react.interfaces.fabric.ReactSurface; -import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags; import com.facebook.react.modules.core.PermissionListener; import com.facebook.react.views.view.WindowUtilKt; import com.facebook.systrace.Systrace; @@ -144,29 +143,9 @@ public void onCreate(@Nullable Bundle savedInstanceState) { } } } - if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()) { - mReactDelegate = - new ReactDelegate( - getPlainActivity(), getReactHost(), mainComponentName, launchOptions); - } else { - mReactDelegate = - new ReactDelegate( - getPlainActivity(), - getReactNativeHost(), - mainComponentName, - launchOptions, - isFabricEnabled()) { - @Override - @Nullable - protected ReactRootView createRootView() { - ReactRootView rootView = ReactActivityDelegate.this.createRootView(); - if (rootView == null) { - rootView = super.createRootView(); - } - return rootView; - } - }; - } + mReactDelegate = + new ReactDelegate( + getPlainActivity(), getReactHost(), mainComponentName, launchOptions); if (mainComponentName != null) { loadApp(mainComponentName); } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.kt index b661b6f454ee..bb4710b890f8 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.kt @@ -13,12 +13,10 @@ import android.content.res.Configuration import android.os.Bundle import android.view.KeyEvent import com.facebook.react.bridge.ReactContext -import com.facebook.react.bridge.UiThreadUtil.runOnUiThread import com.facebook.react.devsupport.DoubleTapReloadRecognizer import com.facebook.react.devsupport.ReleaseDevSupportManager import com.facebook.react.devsupport.interfaces.DevSupportManager import com.facebook.react.interfaces.fabric.ReactSurface -import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler /** @@ -101,19 +99,7 @@ public open class ReactDelegate { } private val devSupportManager: DevSupportManager? - get() = - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && - reactHost?.devSupportManager != null - ) { - reactHost?.devSupportManager - } else if ( - reactNativeHost?.hasInstance() == true && reactNativeHost?.reactInstanceManager != null - ) { - reactNativeHost?.reactInstanceManager?.devSupportManager - } else { - null - } + get() = reactHost?.devSupportManager public fun onHostResume() { if (activity !is DefaultHardwareBackBtnHandler) { @@ -121,79 +107,30 @@ public open class ReactDelegate { "Host Activity `${activity.javaClass.simpleName}` does not implement DefaultHardwareBackBtnHandler" ) } - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && reactHost != null - ) { - reactHost?.onHostResume(activity, activity as DefaultHardwareBackBtnHandler) - } else { - if (reactNativeHost?.hasInstance() == true) { - reactNativeHost - ?.reactInstanceManager - ?.onHostResume(activity, activity as DefaultHardwareBackBtnHandler) - } - } + reactHost?.onHostResume(activity, activity as DefaultHardwareBackBtnHandler) } public fun onUserLeaveHint() { - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && reactHost != null - ) { - reactHost?.onHostLeaveHint(activity) - } else { - if (reactNativeHost?.hasInstance() == true) { - reactNativeHost?.reactInstanceManager?.onUserLeaveHint(activity) - } - } + reactHost?.onHostLeaveHint(activity) } public fun onHostPause() { - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && reactHost != null - ) { - reactHost?.onHostPause(activity) - } else { - if (reactNativeHost?.hasInstance() == true) { - reactNativeHost?.reactInstanceManager?.onHostPause(activity) - } - } + reactHost?.onHostPause(activity) } public fun onHostDestroy() { unloadApp() - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && reactHost != null - ) { - reactHost?.onHostDestroy(activity) - } else { - if (reactNativeHost?.hasInstance() == true) { - reactNativeHost?.reactInstanceManager?.onHostDestroy(activity) - } - } + reactHost?.onHostDestroy(activity) } public fun onBackPressed(): Boolean { - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && reactHost != null - ) { - return reactHost?.onBackPressed() == true - } else if (reactNativeHost?.hasInstance() == true) { - reactNativeHost?.reactInstanceManager?.onBackPressed() - return true - } - return false + return reactHost?.onBackPressed() == true } public fun onNewIntent(intent: Intent): Boolean { - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && reactHost != null - ) { + if (reactHost != null) { reactHost?.onNewIntent(intent) return true - } else { - if (reactNativeHost?.hasInstance() == true) { - reactNativeHost?.reactInstanceManager?.onNewIntent(intent) - return true - } } return false } @@ -204,53 +141,21 @@ public open class ReactDelegate { data: Intent?, shouldForwardToReactInstance: Boolean, ) { - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && - reactHost != null && - shouldForwardToReactInstance - ) { + if (reactHost != null && shouldForwardToReactInstance) { reactHost?.onActivityResult(activity, requestCode, resultCode, data) - } else { - if (reactNativeHost?.hasInstance() == true && shouldForwardToReactInstance) { - reactNativeHost - ?.reactInstanceManager - ?.onActivityResult(activity, requestCode, resultCode, data) - } } } public fun onWindowFocusChanged(hasFocus: Boolean) { - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && reactHost != null - ) { - reactHost?.onWindowFocusChange(hasFocus) - } else { - if (reactNativeHost?.hasInstance() == true) { - reactNativeHost?.reactInstanceManager?.onWindowFocusChange(hasFocus) - } - } + reactHost?.onWindowFocusChange(hasFocus) } public fun onConfigurationChanged(newConfig: Configuration?) { - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && reactHost != null - ) { - reactHost?.onConfigurationChanged(checkNotNull(activity)) - } else { - if (reactNativeHost?.hasInstance() == true) { - getReactInstanceManager().onConfigurationChanged(checkNotNull(activity), newConfig) - } - } + reactHost?.onConfigurationChanged(checkNotNull(activity)) } public fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean { - if ( - keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD && - ((ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && - reactHost?.devSupportManager != null) || - (reactNativeHost?.hasInstance() == true && - reactNativeHost?.getUseDeveloperSupport() == true)) - ) { + if (keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD && reactHost?.devSupportManager != null) { event.startTracking() return true } @@ -259,23 +164,11 @@ public open class ReactDelegate { public fun onKeyLongPress(keyCode: Int): Boolean { if (keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD || keyCode == KeyEvent.KEYCODE_BACK) { - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && reactHost != null - ) { - val devSupportManager = reactHost?.devSupportManager - // onKeyLongPress is a Dev API and not supported in RELEASE mode. - if (devSupportManager != null && devSupportManager !is ReleaseDevSupportManager) { - devSupportManager.showDevOptionsDialog() - return true - } - } else { - if ( - reactNativeHost?.hasInstance() == true && - reactNativeHost?.getUseDeveloperSupport() == true - ) { - reactNativeHost?.reactInstanceManager?.showDevOptionsDialog() - return true - } + val devSupportManager = reactHost?.devSupportManager + // onKeyLongPress is a Dev API and not supported in RELEASE mode. + if (devSupportManager != null && devSupportManager !is ReleaseDevSupportManager) { + devSupportManager.showDevOptionsDialog() + return true } } return false @@ -287,18 +180,7 @@ public open class ReactDelegate { // Reload in RELEASE mode if (devSupportManager is ReleaseDevSupportManager) { // Do not reload the bundle from JS as there is no bundler running in release mode. - if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()) { - reactHost?.reload("ReactDelegate.reload()") - } else { - runOnUiThread { - if ( - reactNativeHost?.hasInstance() == true && - reactNativeHost?.reactInstanceManager != null - ) { - reactNativeHost?.reactInstanceManager?.recreateReactContextInBackground() - } - } - } + reactHost?.reload("ReactDelegate.reload()") return } @@ -318,37 +200,17 @@ public open class ReactDelegate { * @param appKey The ID of the app to load into the surface. */ public fun loadApp(appKey: String) { - // With Bridgeless enabled, create and start the surface - if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()) { - val reactHost = reactHost - if (reactSurface == null && reactHost != null) { - reactSurface = reactHost.createSurface(activity, appKey, launchOptions) - } - reactSurface?.start() - } else { - check(internalReactRootView == null) { "Cannot loadApp while app is already running." } - internalReactRootView = createRootView() - if (reactNativeHost != null) { - internalReactRootView?.startReactApplication( - reactNativeHost?.reactInstanceManager, - appKey, - launchOptions, - ) - } + val reactHost = reactHost + if (reactSurface == null && reactHost != null) { + reactSurface = reactHost.createSurface(activity, appKey, launchOptions) } + reactSurface?.start() } /** Stop the React surface started with [ReactDelegate.loadApp]. */ public fun unloadApp() { - if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()) { - reactSurface?.stop() - reactSurface = null - } else { - if (internalReactRootView != null) { - internalReactRootView?.unmountReactApplication() - internalReactRootView = null - } - } + reactSurface?.stop() + reactSurface = null } public fun setReactSurface(reactSurface: ReactSurface?) { @@ -356,17 +218,7 @@ public open class ReactDelegate { } public var reactRootView: ReactRootView? - get() { - return if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()) { - if (reactSurface != null) { - reactSurface?.view as ReactRootView? - } else { - null - } - } else { - internalReactRootView - } - } + get() = reactSurface?.view as ReactRootView? set(reactRootView) { internalReactRootView = reactRootView } @@ -420,21 +272,11 @@ public open class ReactDelegate { } /** - * Get the current [ReactContext] from [ReactHost] or [ReactInstanceManager] + * Get the current [ReactContext] from [ReactHost]. * * Do not store a reference to this, if the React instance is reloaded or destroyed, this context * will no longer be valid. */ public val currentReactContext: ReactContext? - get() { - return if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()) { - if (reactHost != null) { - reactHost?.currentReactContext - } else { - null - } - } else { - getReactInstanceManager().currentReactContext - } - } + get() = reactHost?.currentReactContext } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactFragment.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactFragment.kt index d1b64a19c09f..d72d24b76a02 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactFragment.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactFragment.kt @@ -15,7 +15,6 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment -import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags import com.facebook.react.modules.core.PermissionAwareActivity import com.facebook.react.modules.core.PermissionListener @@ -42,19 +41,7 @@ public open class ReactFragment : Fragment(), PermissionAwareActivity { } checkNotNull(mainComponentName) { "Cannot loadApp if component name is null" } - reactDelegate = - if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()) { - ReactDelegate(requireActivity(), reactHost, mainComponentName, launchOptions) - } else { - @Suppress("DEPRECATION") - ReactDelegate( - requireActivity(), - reactNativeHost, - mainComponentName, - launchOptions, - fabricEnabled, - ) - } + reactDelegate = ReactDelegate(requireActivity(), reactHost, mainComponentName, launchOptions) } /** diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.kt index 749c942f7c45..13413169d114 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.kt @@ -24,8 +24,7 @@ public abstract class ReactPackageTurboModuleManagerDelegate : TurboModuleManage private val moduleProviders = mutableListOf() private val packageModuleInfos = mutableMapOf>() private val shouldEnableLegacyModuleInterop = - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && - ReactNativeNewArchitectureFeatureFlags.useTurboModuleInterop() + ReactNativeNewArchitectureFeatureFlags.useTurboModuleInterop() protected constructor( reactApplicationContext: ReactApplicationContext, diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt index 7cccb926e7fa..8d408dbc27d0 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt @@ -113,7 +113,7 @@ public object DefaultNewArchitectureEntryPoint { ReactNativeFeatureFlags.override(featureFlags) privateTurboModulesEnabled = true - privateBridgelessEnabled = featureFlags.enableBridgelessArchitecture() + privateBridgelessEnabled = true val (isValid, errorMessage) = isConfigurationValid( diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.kt index 0608c07b78b5..849eab7b4cbe 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.kt @@ -71,7 +71,6 @@ import com.facebook.react.devsupport.interfaces.StackFrame import com.facebook.react.devsupport.perfmonitor.PerfMonitorDevHelper import com.facebook.react.devsupport.perfmonitor.PerfMonitorOverlayManager import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags -import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags import com.facebook.react.modules.core.RCTNativeAppEventEmitter import com.facebook.react.modules.debug.interfaces.DeveloperSettings import com.facebook.react.packagerconnection.RequestHandler @@ -243,8 +242,7 @@ public abstract class DevSupportManagerBase( ) } if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && - ReactNativeFeatureFlags.perfMonitorV2Enabled() && + ReactNativeFeatureFlags.perfMonitorV2Enabled() && reactInstanceDevHelper is PerfMonitorDevHelper ) { perfMonitorOverlayManager = diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index 79365f7c6447..f01d1ae69447 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<86c797c19cc585b74714ca3aa75bbd6d>> + * @generated SignedSource<<842b7827e5505a68e9defb8ac9a63380>> */ /** @@ -37,7 +37,7 @@ public object ReactNativeFeatureFlags { public fun commonTestFlag(): Boolean = accessor.commonTestFlag() /** - * Enable emitting of InteractionEntry live metrics to the debugger. Requires `enableBridgelessArchitecture`. + * Enable emitting of InteractionEntry live metrics to the debugger. */ @JvmStatic public fun cdpInteractionMetricsEnabled(): Boolean = accessor.cdpInteractionMetricsEnabled() @@ -108,12 +108,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun enableAndroidTextMeasurementOptimizations(): Boolean = accessor.enableAndroidTextMeasurementOptimizations() - /** - * Feature flag to enable the new bridgeless architecture. - */ - @JvmStatic - public fun enableBridgelessArchitecture(): Boolean = accessor.enableBridgelessArchitecture() - /** * Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java). */ @@ -373,7 +367,7 @@ public object ReactNativeFeatureFlags { public fun fuseboxFrameRecordingEnabled(): Boolean = accessor.fuseboxFrameRecordingEnabled() /** - * Enable network inspection support in the React Native DevTools CDP backend. Requires `enableBridgelessArchitecture`. This flag is global and should not be changed across React Host lifetimes. + * Enable network inspection support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes. */ @JvmStatic public fun fuseboxNetworkInspectionEnabled(): Boolean = accessor.fuseboxNetworkInspectionEnabled() diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index 305ce615168b..058bd62c3fe9 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -33,7 +33,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var enableAccessibilityOrderCache: Boolean? = null private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null private var enableAndroidTextMeasurementOptimizationsCache: Boolean? = null - private var enableBridgelessArchitectureCache: Boolean? = null private var enableCppPropsIteratorSetterCache: Boolean? = null private var enableCustomFocusSearchOnClippedElementsAndroidCache: Boolean? = null private var enableDestroyShadowTreeRevisionAsyncCache: Boolean? = null @@ -225,15 +224,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun enableBridgelessArchitecture(): Boolean { - var cached = enableBridgelessArchitectureCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.enableBridgelessArchitecture() - enableBridgelessArchitectureCache = cached - } - return cached - } - override fun enableCppPropsIteratorSetter(): Boolean { var cached = enableCppPropsIteratorSetterCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index dc2b84bde267..a42808b56ece 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<2ee82b1e1dcae3ea10dbd92549d65a6c>> + * @generated SignedSource<<446660d78fadec49cf7cf6e1061966f8>> */ /** @@ -54,8 +54,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun enableAndroidTextMeasurementOptimizations(): Boolean - @DoNotStrip @JvmStatic public external fun enableBridgelessArchitecture(): Boolean - @DoNotStrip @JvmStatic public external fun enableCppPropsIteratorSetter(): Boolean @DoNotStrip @JvmStatic public external fun enableCustomFocusSearchOnClippedElementsAndroid(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index f8139daac1e9..1638e1e0692a 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<738a114e73ddb940fb14efd0dff79d1b>> + * @generated SignedSource<> */ /** @@ -49,8 +49,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun enableAndroidTextMeasurementOptimizations(): Boolean = false - override fun enableBridgelessArchitecture(): Boolean = false - override fun enableCppPropsIteratorSetter(): Boolean = false override fun enableCustomFocusSearchOnClippedElementsAndroid(): Boolean = true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index 8f53fbccb447..38863bb656a4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -37,7 +37,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var enableAccessibilityOrderCache: Boolean? = null private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null private var enableAndroidTextMeasurementOptimizationsCache: Boolean? = null - private var enableBridgelessArchitectureCache: Boolean? = null private var enableCppPropsIteratorSetterCache: Boolean? = null private var enableCustomFocusSearchOnClippedElementsAndroidCache: Boolean? = null private var enableDestroyShadowTreeRevisionAsyncCache: Boolean? = null @@ -242,16 +241,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } - override fun enableBridgelessArchitecture(): Boolean { - var cached = enableBridgelessArchitectureCache - if (cached == null) { - cached = currentProvider.enableBridgelessArchitecture() - accessedFeatureFlags.add("enableBridgelessArchitecture") - enableBridgelessArchitectureCache = cached - } - return cached - } - override fun enableCppPropsIteratorSetter(): Boolean { var cached = enableCppPropsIteratorSetterCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt index 298189739990..2d9683cb3cf7 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<0642a793f11832205a362e6d1ae6e081>> + * @generated SignedSource<> */ /** @@ -25,8 +25,6 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android : ReactN override fun enableAccessibilityOrder(): Boolean = true - override fun enableBridgelessArchitecture(): Boolean = true - override fun enableIntersectionObserverByDefault(): Boolean = true override fun enableSwiftUIBasedFilters(): Boolean = true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index 48cd9d2cfdbd..a5fc276f2fb4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<41d522d7f77f0054537450ff192b5991>> */ /** @@ -49,8 +49,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun enableAndroidTextMeasurementOptimizations(): Boolean - @DoNotStrip public fun enableBridgelessArchitecture(): Boolean - @DoNotStrip public fun enableCppPropsIteratorSetter(): Boolean @DoNotStrip public fun enableCustomFocusSearchOnClippedElementsAndroid(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlags.kt index 1e7e48099ec8..75dcb8b9b8a6 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlags.kt @@ -23,18 +23,6 @@ import com.facebook.react.common.build.ReactBuildConfig @SuppressLint("UseReactNativeNewArchitectureFeatureFlagDetector") public object ReactNativeNewArchitectureFeatureFlags { - @JvmStatic - public fun enableBridgelessArchitecture(): Boolean { - if (ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE) { - Assertions.assertCondition( - ReactNativeFeatureFlags.enableBridgelessArchitecture(), - "ReactNativeFeatureFlags.enableBridgelessArchitecture() should be set to TRUE when Strict Mode is enabled", - ) - return true - } - return ReactNativeFeatureFlags.enableBridgelessArchitecture() - } - @JvmStatic public fun useFabricInterop(): Boolean { if (ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlagsDefaults.kt index 87b5088789fe..215266039888 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlagsDefaults.kt @@ -23,8 +23,6 @@ package com.facebook.react.internal.featureflags public open class ReactNativeNewArchitectureFeatureFlagsDefaults() : ReactNativeFeatureFlagsDefaults() { - override fun enableBridgelessArchitecture(): Boolean = true - override fun useNativeViewConfigsInBridgelessMode(): Boolean = true override fun useTurboModuleInterop(): Boolean = true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt index 66fa21ae9df3..33daed67cc55 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt @@ -851,12 +851,6 @@ public class ReactHostImpl( } stateTracker.enterState("getOrCreateStartTask()", "Schedule") - if (ReactBuildConfig.DEBUG) { - Assertions.assertCondition( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture(), - "enableBridgelessArchitecture FeatureFlag must be set to start ReactNative.", - ) - } if (ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE) { Assertions.assertCondition( !ReactNativeNewArchitectureFeatureFlags.useFabricInterop(), diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java index 9a139d8593f6..2f456c47e108 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java @@ -23,7 +23,6 @@ import com.facebook.react.common.build.ReactBuildConfig; import com.facebook.react.common.mapbuffer.MapBuffer; import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags; -import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags; import com.facebook.react.touch.JSResponderHandler; import com.facebook.react.touch.ReactInterceptingViewGroup; import com.facebook.react.uimanager.annotations.ReactProp; @@ -406,8 +405,7 @@ public void receiveCommand(@NonNull T view, String commandId, ReadableArray args * Map contains the names (key) and types (value) of the ViewManager's props. */ public Map getNativeProps() { - if (ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE - && ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()) { + if (ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE) { // TODO: review if we need to check fabricInterop here return ViewManagerPropertyUpdater.getNativeProps(getClass(), null); } else { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt index 1e9126710689..bde737c254ef 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt @@ -49,8 +49,6 @@ import com.facebook.react.bridge.ReadableArray import com.facebook.react.bridge.ReadableMap import com.facebook.react.common.annotations.UnstableReactNativeAPI import com.facebook.react.common.annotations.VisibleForTesting -import com.facebook.react.common.build.ReactBuildConfig -import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags import com.facebook.react.modules.fresco.ImageCacheControl import com.facebook.react.modules.fresco.ReactNetworkImageRequest import com.facebook.react.uimanager.BackgroundStyleApplicator @@ -61,7 +59,6 @@ import com.facebook.react.uimanager.PixelUtil.pxToDp import com.facebook.react.uimanager.UIManagerHelper import com.facebook.react.uimanager.style.BorderRadiusProp import com.facebook.react.uimanager.style.LogicalEdge -import com.facebook.react.util.RNLog import com.facebook.react.views.image.ImageLoadEvent.Companion.createErrorEvent import com.facebook.react.views.image.ImageLoadEvent.Companion.createLoadEndEvent import com.facebook.react.views.image.ImageLoadEvent.Companion.createLoadEvent @@ -598,12 +595,7 @@ public class ReactImageView( // 3. ReactImageView detects the null src; displays a warning in LogBox (via this code). // 3. LogBox renders an , which fabric preallocates. // 4. Rinse and repeat. - if ( - ReactBuildConfig.DEBUG && - !ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() - ) { - RNLog.w(context as ReactContext, "ReactImageView: Image source \"$uri\" doesn't exist") - } + // With bridgeless always on, this warning is suppressed; see comment above. } private inner class TilePostprocessor : BasePostprocessor() { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt index 8f4d9ad68736..7c3b2a447088 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt @@ -48,7 +48,6 @@ import com.facebook.react.bridge.ReactSoftExceptionLogger.logSoftException import com.facebook.react.common.ReactConstants import com.facebook.react.common.build.ReactBuildConfig import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags -import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags import com.facebook.react.uimanager.BackgroundStyleApplicator.clipToPaddingBox import com.facebook.react.uimanager.BackgroundStyleApplicator.getBackgroundColor import com.facebook.react.uimanager.BackgroundStyleApplicator.getBorderColor @@ -916,10 +915,7 @@ public open class ReactEditText public constructor(context: Context) : AppCompat public override fun onConfigurationChanged(newConfig: Configuration) { super.onConfigurationChanged(newConfig) - if ( - ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() && - ReactNativeFeatureFlags.enableFontScaleChangesUpdatingLayout() - ) { + if (ReactNativeFeatureFlags.enableFontScaleChangesUpdatingLayout()) { applyTextAttributes() } } diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index 6739e6bbd6f0..6a5ea698e887 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<99f843dd0784f9fe372f943767e2033c>> + * @generated SignedSource<<57f8d2b5e751c6ce87030a3d48e31e83>> */ /** @@ -117,12 +117,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool enableBridgelessArchitecture() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enableBridgelessArchitecture"); - return method(javaProvider_); - } - bool enableCppPropsIteratorSetter() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enableCppPropsIteratorSetter"); @@ -630,11 +624,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableAndroidTextMeasurementOptimizatio return ReactNativeFeatureFlags::enableAndroidTextMeasurementOptimizations(); } -bool JReactNativeFeatureFlagsCxxInterop::enableBridgelessArchitecture( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::enableBridgelessArchitecture(); -} - bool JReactNativeFeatureFlagsCxxInterop::enableCppPropsIteratorSetter( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::enableCppPropsIteratorSetter(); @@ -1070,9 +1059,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "enableAndroidTextMeasurementOptimizations", JReactNativeFeatureFlagsCxxInterop::enableAndroidTextMeasurementOptimizations), - makeNativeMethod( - "enableBridgelessArchitecture", - JReactNativeFeatureFlagsCxxInterop::enableBridgelessArchitecture), makeNativeMethod( "enableCppPropsIteratorSetter", JReactNativeFeatureFlagsCxxInterop::enableCppPropsIteratorSetter), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index dd0b77894e26..efe2b13581e5 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<05716b6ab8139bc31b962f9158acd6b6>> + * @generated SignedSource<<67b2470abe5b91dadbf9030c5ae24971>> */ /** @@ -69,9 +69,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool enableAndroidTextMeasurementOptimizations( facebook::jni::alias_ref); - static bool enableBridgelessArchitecture( - facebook::jni::alias_ref); - static bool enableCppPropsIteratorSetter( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp index b1461a35eeff..94dd72fbb416 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp @@ -228,11 +228,7 @@ std::shared_ptr TurboModuleManager::getTurboModule( TurboModuleProviderFunctionTypeWithRuntime TurboModuleManager::createLegacyModuleProvider( jni::alias_ref javaPart) { - bool shouldCreateLegacyModules = - ReactNativeFeatureFlags::enableBridgelessArchitecture() && - ReactNativeFeatureFlags::useTurboModuleInterop(); - - if (!shouldCreateLegacyModules) { + if (!ReactNativeFeatureFlags::useTurboModuleInterop()) { return nullptr; } diff --git a/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.cpp b/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.cpp index 6c64e2f1393c..59cae70d8b70 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.cpp @@ -82,7 +82,6 @@ const InspectorFlags::Values& InspectorFlags::loadFlagsAndAssertUnchanged() false, #endif .networkInspectionEnabled = - ReactNativeFeatureFlags::enableBridgelessArchitecture() && ReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled(), .perfIssuesEnabled = ReactNativeFeatureFlags::perfIssuesEnabled(), }; diff --git a/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp b/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp index 17a83c994139..6dcdcd696991 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp @@ -46,13 +46,6 @@ class ReactNativeFeatureFlagsOverrides ReactNativeFeatureFlagsDefaults::fuseboxNetworkInspectionEnabled()); } - bool enableBridgelessArchitecture() override { - // NOTE: Network support is gated by (enableBridgelessArchitecture && - // fuseboxNetworkInspectionEnabled). - return overrides_.networkInspectionEnabled.value_or( - ReactNativeFeatureFlagsDefaults::enableBridgelessArchitecture()); - } - bool enableNetworkEventReporting() override { return overrides_.enableNetworkEventReporting.value_or( ReactNativeFeatureFlagsDefaults::enableNetworkEventReporting()); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index 52b1f286fd63..b5feb9eb39e5 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<68aacf5098ab7c3a81c52a511e4fe22b>> */ /** @@ -78,10 +78,6 @@ bool ReactNativeFeatureFlags::enableAndroidTextMeasurementOptimizations() { return getAccessor().enableAndroidTextMeasurementOptimizations(); } -bool ReactNativeFeatureFlags::enableBridgelessArchitecture() { - return getAccessor().enableBridgelessArchitecture(); -} - bool ReactNativeFeatureFlags::enableCppPropsIteratorSetter() { return getAccessor().enableCppPropsIteratorSetter(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index ab8a57dd6046..babd1f029944 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<4244b2b4e3e8f1c958811809c603ff0e>> */ /** @@ -45,7 +45,7 @@ class ReactNativeFeatureFlags { RN_EXPORT static bool commonTestFlag(); /** - * Enable emitting of InteractionEntry live metrics to the debugger. Requires `enableBridgelessArchitecture`. + * Enable emitting of InteractionEntry live metrics to the debugger. */ RN_EXPORT static bool cdpInteractionMetricsEnabled(); @@ -104,11 +104,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool enableAndroidTextMeasurementOptimizations(); - /** - * Feature flag to enable the new bridgeless architecture. - */ - RN_EXPORT static bool enableBridgelessArchitecture(); - /** * Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java). */ @@ -325,7 +320,7 @@ class ReactNativeFeatureFlags { RN_EXPORT static bool fuseboxFrameRecordingEnabled(); /** - * Enable network inspection support in the React Native DevTools CDP backend. Requires `enableBridgelessArchitecture`. This flag is global and should not be changed across React Host lifetimes. + * Enable network inspection support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes. */ RN_EXPORT static bool fuseboxNetworkInspectionEnabled(); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 20cb03981c57..779d426a45a3 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<802368c8b05006c737ab106bcb9ecf00>> + * @generated SignedSource<<181c6e543903ad4ae4fc00a9764930a2>> */ /** @@ -263,24 +263,6 @@ bool ReactNativeFeatureFlagsAccessor::enableAndroidTextMeasurementOptimizations( return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::enableBridgelessArchitecture() { - auto flagValue = enableBridgelessArchitecture_.load(); - - if (!flagValue.has_value()) { - // This block is not exclusive but it is not necessary. - // If multiple threads try to initialize the feature flag, we would only - // be accessing the provider multiple times but the end state of this - // instance and the returned flag value would be the same. - - markFlagAsAccessed(13, "enableBridgelessArchitecture"); - - flagValue = currentProvider_->enableBridgelessArchitecture(); - enableBridgelessArchitecture_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::enableCppPropsIteratorSetter() { auto flagValue = enableCppPropsIteratorSetter_.load(); @@ -290,7 +272,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCppPropsIteratorSetter() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(14, "enableCppPropsIteratorSetter"); + markFlagAsAccessed(13, "enableCppPropsIteratorSetter"); flagValue = currentProvider_->enableCppPropsIteratorSetter(); enableCppPropsIteratorSetter_ = flagValue; @@ -308,7 +290,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCustomFocusSearchOnClippedElementsAn // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(15, "enableCustomFocusSearchOnClippedElementsAndroid"); + markFlagAsAccessed(14, "enableCustomFocusSearchOnClippedElementsAndroid"); flagValue = currentProvider_->enableCustomFocusSearchOnClippedElementsAndroid(); enableCustomFocusSearchOnClippedElementsAndroid_ = flagValue; @@ -326,7 +308,7 @@ bool ReactNativeFeatureFlagsAccessor::enableDestroyShadowTreeRevisionAsync() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(16, "enableDestroyShadowTreeRevisionAsync"); + markFlagAsAccessed(15, "enableDestroyShadowTreeRevisionAsync"); flagValue = currentProvider_->enableDestroyShadowTreeRevisionAsync(); enableDestroyShadowTreeRevisionAsync_ = flagValue; @@ -344,7 +326,7 @@ bool ReactNativeFeatureFlagsAccessor::enableDifferentiatorMutationVectorPrealloc // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(17, "enableDifferentiatorMutationVectorPreallocation"); + markFlagAsAccessed(16, "enableDifferentiatorMutationVectorPreallocation"); flagValue = currentProvider_->enableDifferentiatorMutationVectorPreallocation(); enableDifferentiatorMutationVectorPreallocation_ = flagValue; @@ -362,7 +344,7 @@ bool ReactNativeFeatureFlagsAccessor::enableDoubleMeasurementFixAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(18, "enableDoubleMeasurementFixAndroid"); + markFlagAsAccessed(17, "enableDoubleMeasurementFixAndroid"); flagValue = currentProvider_->enableDoubleMeasurementFixAndroid(); enableDoubleMeasurementFixAndroid_ = flagValue; @@ -380,7 +362,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEagerRootViewAttachment() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(19, "enableEagerRootViewAttachment"); + markFlagAsAccessed(18, "enableEagerRootViewAttachment"); flagValue = currentProvider_->enableEagerRootViewAttachment(); enableEagerRootViewAttachment_ = flagValue; @@ -398,7 +380,7 @@ bool ReactNativeFeatureFlagsAccessor::enableExclusivePropsUpdateAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(20, "enableExclusivePropsUpdateAndroid"); + markFlagAsAccessed(19, "enableExclusivePropsUpdateAndroid"); flagValue = currentProvider_->enableExclusivePropsUpdateAndroid(); enableExclusivePropsUpdateAndroid_ = flagValue; @@ -416,7 +398,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricCommitBranching() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(21, "enableFabricCommitBranching"); + markFlagAsAccessed(20, "enableFabricCommitBranching"); flagValue = currentProvider_->enableFabricCommitBranching(); enableFabricCommitBranching_ = flagValue; @@ -434,7 +416,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricLogs() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(22, "enableFabricLogs"); + markFlagAsAccessed(21, "enableFabricLogs"); flagValue = currentProvider_->enableFabricLogs(); enableFabricLogs_ = flagValue; @@ -452,7 +434,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFontScaleChangesUpdatingLayout() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(23, "enableFontScaleChangesUpdatingLayout"); + markFlagAsAccessed(22, "enableFontScaleChangesUpdatingLayout"); flagValue = currentProvider_->enableFontScaleChangesUpdatingLayout(); enableFontScaleChangesUpdatingLayout_ = flagValue; @@ -470,7 +452,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIOSTextBaselineOffsetPerLine() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(24, "enableIOSTextBaselineOffsetPerLine"); + markFlagAsAccessed(23, "enableIOSTextBaselineOffsetPerLine"); flagValue = currentProvider_->enableIOSTextBaselineOffsetPerLine(); enableIOSTextBaselineOffsetPerLine_ = flagValue; @@ -488,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIOSViewClipToPaddingBox() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(25, "enableIOSViewClipToPaddingBox"); + markFlagAsAccessed(24, "enableIOSViewClipToPaddingBox"); flagValue = currentProvider_->enableIOSViewClipToPaddingBox(); enableIOSViewClipToPaddingBox_ = flagValue; @@ -506,7 +488,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImagePrefetchingAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(26, "enableImagePrefetchingAndroid"); + markFlagAsAccessed(25, "enableImagePrefetchingAndroid"); flagValue = currentProvider_->enableImagePrefetchingAndroid(); enableImagePrefetchingAndroid_ = flagValue; @@ -524,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImageRequestDowngradingForNonVisible // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(27, "enableImageRequestDowngradingForNonVisibleImages"); + markFlagAsAccessed(26, "enableImageRequestDowngradingForNonVisibleImages"); flagValue = currentProvider_->enableImageRequestDowngradingForNonVisibleImages(); enableImageRequestDowngradingForNonVisibleImages_ = flagValue; @@ -542,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImmediateUpdateModeForContentOffsetC // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(28, "enableImmediateUpdateModeForContentOffsetChanges"); + markFlagAsAccessed(27, "enableImmediateUpdateModeForContentOffsetChanges"); flagValue = currentProvider_->enableImmediateUpdateModeForContentOffsetChanges(); enableImmediateUpdateModeForContentOffsetChanges_ = flagValue; @@ -560,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImperativeFocus() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(29, "enableImperativeFocus"); + markFlagAsAccessed(28, "enableImperativeFocus"); flagValue = currentProvider_->enableImperativeFocus(); enableImperativeFocus_ = flagValue; @@ -578,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::enableInteropViewManagerClassLookUpOptimiz // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(30, "enableInteropViewManagerClassLookUpOptimizationIOS"); + markFlagAsAccessed(29, "enableInteropViewManagerClassLookUpOptimizationIOS"); flagValue = currentProvider_->enableInteropViewManagerClassLookUpOptimizationIOS(); enableInteropViewManagerClassLookUpOptimizationIOS_ = flagValue; @@ -596,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIntersectionObserverByDefault() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(31, "enableIntersectionObserverByDefault"); + markFlagAsAccessed(30, "enableIntersectionObserverByDefault"); flagValue = currentProvider_->enableIntersectionObserverByDefault(); enableIntersectionObserverByDefault_ = flagValue; @@ -614,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::enableKeyEvents() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(32, "enableKeyEvents"); + markFlagAsAccessed(31, "enableKeyEvents"); flagValue = currentProvider_->enableKeyEvents(); enableKeyEvents_ = flagValue; @@ -632,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(33, "enableLayoutAnimationsOnAndroid"); + markFlagAsAccessed(32, "enableLayoutAnimationsOnAndroid"); flagValue = currentProvider_->enableLayoutAnimationsOnAndroid(); enableLayoutAnimationsOnAndroid_ = flagValue; @@ -650,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnIOS() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(34, "enableLayoutAnimationsOnIOS"); + markFlagAsAccessed(33, "enableLayoutAnimationsOnIOS"); flagValue = currentProvider_->enableLayoutAnimationsOnIOS(); enableLayoutAnimationsOnIOS_ = flagValue; @@ -668,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::enableModuleArgumentNSNullConversionIOS() // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(35, "enableModuleArgumentNSNullConversionIOS"); + markFlagAsAccessed(34, "enableModuleArgumentNSNullConversionIOS"); flagValue = currentProvider_->enableModuleArgumentNSNullConversionIOS(); enableModuleArgumentNSNullConversionIOS_ = flagValue; @@ -686,7 +668,7 @@ bool ReactNativeFeatureFlagsAccessor::enableMutationObserverByDefault() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(36, "enableMutationObserverByDefault"); + markFlagAsAccessed(35, "enableMutationObserverByDefault"); flagValue = currentProvider_->enableMutationObserverByDefault(); enableMutationObserverByDefault_ = flagValue; @@ -704,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNativeCSSParsing() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(37, "enableNativeCSSParsing"); + markFlagAsAccessed(36, "enableNativeCSSParsing"); flagValue = currentProvider_->enableNativeCSSParsing(); enableNativeCSSParsing_ = flagValue; @@ -722,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNetworkEventReporting() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(38, "enableNetworkEventReporting"); + markFlagAsAccessed(37, "enableNetworkEventReporting"); flagValue = currentProvider_->enableNetworkEventReporting(); enableNetworkEventReporting_ = flagValue; @@ -740,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreparedTextLayout() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(39, "enablePreparedTextLayout"); + markFlagAsAccessed(38, "enablePreparedTextLayout"); flagValue = currentProvider_->enablePreparedTextLayout(); enablePreparedTextLayout_ = flagValue; @@ -758,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(40, "enablePropsUpdateReconciliationAndroid"); + markFlagAsAccessed(39, "enablePropsUpdateReconciliationAndroid"); flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid(); enablePropsUpdateReconciliationAndroid_ = flagValue; @@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::enableRuntimeSchedulerQueueClearingOnError // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(41, "enableRuntimeSchedulerQueueClearingOnError"); + markFlagAsAccessed(40, "enableRuntimeSchedulerQueueClearingOnError"); flagValue = currentProvider_->enableRuntimeSchedulerQueueClearingOnError(); enableRuntimeSchedulerQueueClearingOnError_ = flagValue; @@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSchedulerDelegateInvalidation() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(42, "enableSchedulerDelegateInvalidation"); + markFlagAsAccessed(41, "enableSchedulerDelegateInvalidation"); flagValue = currentProvider_->enableSchedulerDelegateInvalidation(); enableSchedulerDelegateInvalidation_ = flagValue; @@ -812,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSwiftUIBasedFilters() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(43, "enableSwiftUIBasedFilters"); + markFlagAsAccessed(42, "enableSwiftUIBasedFilters"); flagValue = currentProvider_->enableSwiftUIBasedFilters(); enableSwiftUIBasedFilters_ = flagValue; @@ -830,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewCulling() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(44, "enableViewCulling"); + markFlagAsAccessed(43, "enableViewCulling"); flagValue = currentProvider_->enableViewCulling(); enableViewCulling_ = flagValue; @@ -848,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecycling() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(45, "enableViewRecycling"); + markFlagAsAccessed(44, "enableViewRecycling"); flagValue = currentProvider_->enableViewRecycling(); enableViewRecycling_ = flagValue; @@ -866,7 +848,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForImage() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(46, "enableViewRecyclingForImage"); + markFlagAsAccessed(45, "enableViewRecyclingForImage"); flagValue = currentProvider_->enableViewRecyclingForImage(); enableViewRecyclingForImage_ = flagValue; @@ -884,7 +866,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForScrollView() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(47, "enableViewRecyclingForScrollView"); + markFlagAsAccessed(46, "enableViewRecyclingForScrollView"); flagValue = currentProvider_->enableViewRecyclingForScrollView(); enableViewRecyclingForScrollView_ = flagValue; @@ -902,7 +884,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForText() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(48, "enableViewRecyclingForText"); + markFlagAsAccessed(47, "enableViewRecyclingForText"); flagValue = currentProvider_->enableViewRecyclingForText(); enableViewRecyclingForText_ = flagValue; @@ -920,7 +902,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForView() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(49, "enableViewRecyclingForView"); + markFlagAsAccessed(48, "enableViewRecyclingForView"); flagValue = currentProvider_->enableViewRecyclingForView(); enableViewRecyclingForView_ = flagValue; @@ -938,7 +920,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewContainerStateExperimenta // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(50, "enableVirtualViewContainerStateExperimental"); + markFlagAsAccessed(49, "enableVirtualViewContainerStateExperimental"); flagValue = currentProvider_->enableVirtualViewContainerStateExperimental(); enableVirtualViewContainerStateExperimental_ = flagValue; @@ -956,7 +938,7 @@ bool ReactNativeFeatureFlagsAccessor::fixDifferentiatorParentTagForUnflattenCase // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(51, "fixDifferentiatorParentTagForUnflattenCase"); + markFlagAsAccessed(50, "fixDifferentiatorParentTagForUnflattenCase"); flagValue = currentProvider_->fixDifferentiatorParentTagForUnflattenCase(); fixDifferentiatorParentTagForUnflattenCase_ = flagValue; @@ -974,7 +956,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(52, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); + markFlagAsAccessed(51, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact(); fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue; @@ -992,7 +974,7 @@ bool ReactNativeFeatureFlagsAccessor::fixYogaFlexBasisFitContentInMainAxis() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(53, "fixYogaFlexBasisFitContentInMainAxis"); + markFlagAsAccessed(52, "fixYogaFlexBasisFitContentInMainAxis"); flagValue = currentProvider_->fixYogaFlexBasisFitContentInMainAxis(); fixYogaFlexBasisFitContentInMainAxis_ = flagValue; @@ -1010,7 +992,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxAssertSingleHostState() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(54, "fuseboxAssertSingleHostState"); + markFlagAsAccessed(53, "fuseboxAssertSingleHostState"); flagValue = currentProvider_->fuseboxAssertSingleHostState(); fuseboxAssertSingleHostState_ = flagValue; @@ -1028,7 +1010,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledRelease() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(55, "fuseboxEnabledRelease"); + markFlagAsAccessed(54, "fuseboxEnabledRelease"); flagValue = currentProvider_->fuseboxEnabledRelease(); fuseboxEnabledRelease_ = flagValue; @@ -1046,7 +1028,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxFrameRecordingEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(56, "fuseboxFrameRecordingEnabled"); + markFlagAsAccessed(55, "fuseboxFrameRecordingEnabled"); flagValue = currentProvider_->fuseboxFrameRecordingEnabled(); fuseboxFrameRecordingEnabled_ = flagValue; @@ -1064,7 +1046,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxNetworkInspectionEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(57, "fuseboxNetworkInspectionEnabled"); + markFlagAsAccessed(56, "fuseboxNetworkInspectionEnabled"); flagValue = currentProvider_->fuseboxNetworkInspectionEnabled(); fuseboxNetworkInspectionEnabled_ = flagValue; @@ -1082,7 +1064,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxScreenshotCaptureEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(58, "fuseboxScreenshotCaptureEnabled"); + markFlagAsAccessed(57, "fuseboxScreenshotCaptureEnabled"); flagValue = currentProvider_->fuseboxScreenshotCaptureEnabled(); fuseboxScreenshotCaptureEnabled_ = flagValue; @@ -1100,7 +1082,7 @@ bool ReactNativeFeatureFlagsAccessor::hideOffscreenVirtualViewsOnIOS() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(59, "hideOffscreenVirtualViewsOnIOS"); + markFlagAsAccessed(58, "hideOffscreenVirtualViewsOnIOS"); flagValue = currentProvider_->hideOffscreenVirtualViewsOnIOS(); hideOffscreenVirtualViewsOnIOS_ = flagValue; @@ -1118,7 +1100,7 @@ bool ReactNativeFeatureFlagsAccessor::optimizedAnimatedPropUpdates() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(60, "optimizedAnimatedPropUpdates"); + markFlagAsAccessed(59, "optimizedAnimatedPropUpdates"); flagValue = currentProvider_->optimizedAnimatedPropUpdates(); optimizedAnimatedPropUpdates_ = flagValue; @@ -1136,7 +1118,7 @@ bool ReactNativeFeatureFlagsAccessor::overrideBySynchronousMountPropsAtMountingA // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(61, "overrideBySynchronousMountPropsAtMountingAndroid"); + markFlagAsAccessed(60, "overrideBySynchronousMountPropsAtMountingAndroid"); flagValue = currentProvider_->overrideBySynchronousMountPropsAtMountingAndroid(); overrideBySynchronousMountPropsAtMountingAndroid_ = flagValue; @@ -1154,7 +1136,7 @@ bool ReactNativeFeatureFlagsAccessor::perfIssuesEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(62, "perfIssuesEnabled"); + markFlagAsAccessed(61, "perfIssuesEnabled"); flagValue = currentProvider_->perfIssuesEnabled(); perfIssuesEnabled_ = flagValue; @@ -1172,7 +1154,7 @@ bool ReactNativeFeatureFlagsAccessor::perfMonitorV2Enabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(63, "perfMonitorV2Enabled"); + markFlagAsAccessed(62, "perfMonitorV2Enabled"); flagValue = currentProvider_->perfMonitorV2Enabled(); perfMonitorV2Enabled_ = flagValue; @@ -1190,7 +1172,7 @@ double ReactNativeFeatureFlagsAccessor::preparedTextCacheSize() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(64, "preparedTextCacheSize"); + markFlagAsAccessed(63, "preparedTextCacheSize"); flagValue = currentProvider_->preparedTextCacheSize(); preparedTextCacheSize_ = flagValue; @@ -1208,7 +1190,7 @@ bool ReactNativeFeatureFlagsAccessor::preventShadowTreeCommitExhaustion() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(65, "preventShadowTreeCommitExhaustion"); + markFlagAsAccessed(64, "preventShadowTreeCommitExhaustion"); flagValue = currentProvider_->preventShadowTreeCommitExhaustion(); preventShadowTreeCommitExhaustion_ = flagValue; @@ -1226,7 +1208,7 @@ bool ReactNativeFeatureFlagsAccessor::redBoxV2Android() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(66, "redBoxV2Android"); + markFlagAsAccessed(65, "redBoxV2Android"); flagValue = currentProvider_->redBoxV2Android(); redBoxV2Android_ = flagValue; @@ -1244,7 +1226,7 @@ bool ReactNativeFeatureFlagsAccessor::redBoxV2IOS() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(67, "redBoxV2IOS"); + markFlagAsAccessed(66, "redBoxV2IOS"); flagValue = currentProvider_->redBoxV2IOS(); redBoxV2IOS_ = flagValue; @@ -1262,7 +1244,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHo // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(68, "shouldPressibilityUseW3CPointerEventsForHover"); + markFlagAsAccessed(67, "shouldPressibilityUseW3CPointerEventsForHover"); flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover(); shouldPressibilityUseW3CPointerEventsForHover_ = flagValue; @@ -1280,7 +1262,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldTriggerResponderTransferOnScrollAndr // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(69, "shouldTriggerResponderTransferOnScrollAndroid"); + markFlagAsAccessed(68, "shouldTriggerResponderTransferOnScrollAndroid"); flagValue = currentProvider_->shouldTriggerResponderTransferOnScrollAndroid(); shouldTriggerResponderTransferOnScrollAndroid_ = flagValue; @@ -1298,7 +1280,7 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause() // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(70, "skipActivityIdentityAssertionOnHostPause"); + markFlagAsAccessed(69, "skipActivityIdentityAssertionOnHostPause"); flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause(); skipActivityIdentityAssertionOnHostPause_ = flagValue; @@ -1316,7 +1298,7 @@ bool ReactNativeFeatureFlagsAccessor::syncAndroidClipBoundsWithOverflow() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(71, "syncAndroidClipBoundsWithOverflow"); + markFlagAsAccessed(70, "syncAndroidClipBoundsWithOverflow"); flagValue = currentProvider_->syncAndroidClipBoundsWithOverflow(); syncAndroidClipBoundsWithOverflow_ = flagValue; @@ -1334,7 +1316,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(72, "traceTurboModulePromiseRejectionsOnAndroid"); + markFlagAsAccessed(71, "traceTurboModulePromiseRejectionsOnAndroid"); flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid(); traceTurboModulePromiseRejectionsOnAndroid_ = flagValue; @@ -1352,7 +1334,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit( // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(73, "updateRuntimeShadowNodeReferencesOnCommit"); + markFlagAsAccessed(72, "updateRuntimeShadowNodeReferencesOnCommit"); flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit(); updateRuntimeShadowNodeReferencesOnCommit_ = flagValue; @@ -1370,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommitT // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(74, "updateRuntimeShadowNodeReferencesOnCommitThread"); + markFlagAsAccessed(73, "updateRuntimeShadowNodeReferencesOnCommitThread"); flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommitThread(); updateRuntimeShadowNodeReferencesOnCommitThread_ = flagValue; @@ -1388,7 +1370,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(75, "useAlwaysAvailableJSErrorHandling"); + markFlagAsAccessed(74, "useAlwaysAvailableJSErrorHandling"); flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling(); useAlwaysAvailableJSErrorHandling_ = flagValue; @@ -1406,7 +1388,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(76, "useFabricInterop"); + markFlagAsAccessed(75, "useFabricInterop"); flagValue = currentProvider_->useFabricInterop(); useFabricInterop_ = flagValue; @@ -1424,7 +1406,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(77, "useNativeViewConfigsInBridgelessMode"); + markFlagAsAccessed(76, "useNativeViewConfigsInBridgelessMode"); flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); useNativeViewConfigsInBridgelessMode_ = flagValue; @@ -1442,7 +1424,7 @@ bool ReactNativeFeatureFlagsAccessor::useNestedScrollViewAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(78, "useNestedScrollViewAndroid"); + markFlagAsAccessed(77, "useNestedScrollViewAndroid"); flagValue = currentProvider_->useNestedScrollViewAndroid(); useNestedScrollViewAndroid_ = flagValue; @@ -1460,7 +1442,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedViewRegistryOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(79, "useOptimizedViewRegistryOnAndroid"); + markFlagAsAccessed(78, "useOptimizedViewRegistryOnAndroid"); flagValue = currentProvider_->useOptimizedViewRegistryOnAndroid(); useOptimizedViewRegistryOnAndroid_ = flagValue; @@ -1478,7 +1460,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(80, "useSharedAnimatedBackend"); + markFlagAsAccessed(79, "useSharedAnimatedBackend"); flagValue = currentProvider_->useSharedAnimatedBackend(); useSharedAnimatedBackend_ = flagValue; @@ -1496,7 +1478,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(81, "useTraitHiddenOnAndroid"); + markFlagAsAccessed(80, "useTraitHiddenOnAndroid"); flagValue = currentProvider_->useTraitHiddenOnAndroid(); useTraitHiddenOnAndroid_ = flagValue; @@ -1514,7 +1496,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(82, "useTurboModuleInterop"); + markFlagAsAccessed(81, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -1532,7 +1514,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(83, "viewCullingOutsetRatio"); + markFlagAsAccessed(82, "viewCullingOutsetRatio"); flagValue = currentProvider_->viewCullingOutsetRatio(); viewCullingOutsetRatio_ = flagValue; @@ -1550,7 +1532,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(84, "viewTransitionEnabled"); + markFlagAsAccessed(83, "viewTransitionEnabled"); flagValue = currentProvider_->viewTransitionEnabled(); viewTransitionEnabled_ = flagValue; @@ -1568,7 +1550,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionUseHardwareBitmapAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(85, "viewTransitionUseHardwareBitmapAndroid"); + markFlagAsAccessed(84, "viewTransitionUseHardwareBitmapAndroid"); flagValue = currentProvider_->viewTransitionUseHardwareBitmapAndroid(); viewTransitionUseHardwareBitmapAndroid_ = flagValue; @@ -1586,7 +1568,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(86, "virtualViewPrerenderRatio"); + markFlagAsAccessed(85, "virtualViewPrerenderRatio"); flagValue = currentProvider_->virtualViewPrerenderRatio(); virtualViewPrerenderRatio_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index bab489993007..d1dd1f68c6d5 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<6126d94aaf219c0d4a3ffe84c05b0fb2>> + * @generated SignedSource<<167c3eaa1075f0586c59b292f0c4f285>> */ /** @@ -45,7 +45,6 @@ class ReactNativeFeatureFlagsAccessor { bool enableAccessibilityOrder(); bool enableAccumulatedUpdatesInRawPropsAndroid(); bool enableAndroidTextMeasurementOptimizations(); - bool enableBridgelessArchitecture(); bool enableCppPropsIteratorSetter(); bool enableCustomFocusSearchOnClippedElementsAndroid(); bool enableDestroyShadowTreeRevisionAsync(); @@ -130,7 +129,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 87> accessedFeatureFlags_; + std::array, 86> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> cdpInteractionMetricsEnabled_; @@ -145,7 +144,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> enableAccessibilityOrder_; std::atomic> enableAccumulatedUpdatesInRawPropsAndroid_; std::atomic> enableAndroidTextMeasurementOptimizations_; - std::atomic> enableBridgelessArchitecture_; std::atomic> enableCppPropsIteratorSetter_; std::atomic> enableCustomFocusSearchOnClippedElementsAndroid_; std::atomic> enableDestroyShadowTreeRevisionAsync_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 57e4fb09c82d..4dd6199cd889 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<8e196c7a6bd6b3e3cb47171c8bffac23>> */ /** @@ -79,10 +79,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool enableBridgelessArchitecture() override { - return false; - } - bool enableCppPropsIteratorSetter() override { return false; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index 6a93f2ca138e..0360563fa6d1 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -162,15 +162,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::enableAndroidTextMeasurementOptimizations(); } - bool enableBridgelessArchitecture() override { - auto value = values_["enableBridgelessArchitecture"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::enableBridgelessArchitecture(); - } - bool enableCppPropsIteratorSetter() override { auto value = values_["enableCppPropsIteratorSetter"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h index c1838909b42e..116df897932a 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<72ef3ea85f4833a96fe222950d16278b>> + * @generated SignedSource<<338e07b867ae9c544764a3952e19e961>> */ /** @@ -31,10 +31,6 @@ class ReactNativeFeatureFlagsOverridesOSSCanary : public ReactNativeFeatureFlags return true; } - bool enableBridgelessArchitecture() override { - return true; - } - bool enableIntersectionObserverByDefault() override { return true; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSStable.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSStable.h index e40b317738e0..d60006ec86c3 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSStable.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSStable.h @@ -13,10 +13,6 @@ namespace facebook::react { class ReactNativeFeatureFlagsOverridesOSSStable : public ReactNativeFeatureFlagsDefaults { public: - bool enableBridgelessArchitecture() override - { - return true; - } bool useNativeViewConfigsInBridgelessMode() override { return true; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 1a9ac2e36714..d8e848c3d818 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<8a9430ba71722a75779e2b5fb6564f0e>> + * @generated SignedSource<<5933c687773980c58b80a52705743c66>> */ /** @@ -38,7 +38,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool enableAccessibilityOrder() = 0; virtual bool enableAccumulatedUpdatesInRawPropsAndroid() = 0; virtual bool enableAndroidTextMeasurementOptimizations() = 0; - virtual bool enableBridgelessArchitecture() = 0; virtual bool enableCppPropsIteratorSetter() = 0; virtual bool enableCustomFocusSearchOnClippedElementsAndroid() = 0; virtual bool enableDestroyShadowTreeRevisionAsync() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp index 4d02c5a60f59..902993ead5fd 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp @@ -119,35 +119,6 @@ void TurboModuleBinding::install( TurboModuleProviderFunctionTypeWithRuntime&& moduleProvider, TurboModuleProviderFunctionTypeWithRuntime&& legacyModuleProvider, std::shared_ptr longLivedObjectCollection) { - // TODO(T208105802): We can get this information from the native side! - auto isBridgeless = runtime.global().hasProperty(runtime, "RN$Bridgeless"); - - if (!isBridgeless) { - runtime.global().setProperty( - runtime, - "__turboModuleProxy", - jsi::Function::createFromHostFunction( - runtime, - jsi::PropNameID::forAscii(runtime, "__turboModuleProxy"), - 1, - [binding = TurboModuleBinding( - runtime, - std::move(moduleProvider), - longLivedObjectCollection)]( - jsi::Runtime& rt, - const jsi::Value& /*thisVal*/, - const jsi::Value* args, - size_t count) { - if (count < 1) { - throw std::invalid_argument( - "__turboModuleProxy must be called with at least 1 argument"); - } - std::string moduleName = args[0].getString(rt).utf8(rt); - return binding.getModule(rt, moduleName); - })); - return; - } - defineReadOnlyGlobal( runtime, "nativeModuleProxy", diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index b3d37e663da1..27b44ca1070c 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<918bad591e5f0649010e3cc7b7ba593a>> */ /** @@ -109,11 +109,6 @@ bool NativeReactNativeFeatureFlags::enableAndroidTextMeasurementOptimizations( return ReactNativeFeatureFlags::enableAndroidTextMeasurementOptimizations(); } -bool NativeReactNativeFeatureFlags::enableBridgelessArchitecture( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::enableBridgelessArchitecture(); -} - bool NativeReactNativeFeatureFlags::enableCppPropsIteratorSetter( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::enableCppPropsIteratorSetter(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 2fc43feda73e..31f9fdbbd46b 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<9a21979a5eeb2f9daf8c061610199596>> + * @generated SignedSource<> */ /** @@ -62,8 +62,6 @@ class NativeReactNativeFeatureFlags bool enableAndroidTextMeasurementOptimizations(jsi::Runtime& runtime); - bool enableBridgelessArchitecture(jsi::Runtime& runtime); - bool enableCppPropsIteratorSetter(jsi::Runtime& runtime); bool enableCustomFocusSearchOnClippedElementsAndroid(jsi::Runtime& runtime); diff --git a/packages/react-native/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp b/packages/react-native/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp index 98ff3f2e2910..1bf852230d61 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp @@ -143,17 +143,7 @@ void NativeMutationObserver::notifyMutationObserversIfNecessary() { if (dispatchNotification) { TraceSection s("NativeMutationObserver::notifyObservers"); - if (ReactNativeFeatureFlags::enableBridgelessArchitecture()) { - runtime_->queueMicrotask(notifyMutationObservers_.value()); - } else { - jsInvoker_->invokeAsync([&](jsi::Runtime& runtime) { - // It's possible that the last observer was disconnected before we could - // dispatch this notification. - if (notifyMutationObservers_) { - notifyMutationObservers_.value().call(runtime); - } - }); - } + runtime_->queueMicrotask(notifyMutationObservers_.value()); } } diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp index f7393dbdd520..416d8fb66a8c 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp @@ -23,13 +23,8 @@ std::unique_ptr getRuntimeSchedulerImplementation( RuntimeExecutor runtimeExecutor, std::function now, RuntimeSchedulerTaskErrorHandler onTaskError) { - if (ReactNativeFeatureFlags::enableBridgelessArchitecture()) { - return std::make_unique( - std::move(runtimeExecutor), std::move(now), std::move(onTaskError)); - } else { - return std::make_unique( - std::move(runtimeExecutor), std::move(now), std::move(onTaskError)); - } + return std::make_unique( + std::move(runtimeExecutor), std::move(now), std::move(onTaskError)); } } // namespace diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp index 574ec8884fcc..70a9fcd8e38f 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp @@ -30,22 +30,16 @@ class RuntimeSchedulerTestFeatureFlags : public ReactNativeFeatureFlagsDefaults { public: explicit RuntimeSchedulerTestFeatureFlags( - bool enableEventLoop, + bool /*enableEventLoop*/, bool enableRuntimeSchedulerQueueClearingOnError = false) - : enableEventLoop_(enableEventLoop), - enableRuntimeSchedulerQueueClearingOnError_( + : enableRuntimeSchedulerQueueClearingOnError_( enableRuntimeSchedulerQueueClearingOnError) {} - bool enableBridgelessArchitecture() override { - return enableEventLoop_; - } - bool enableRuntimeSchedulerQueueClearingOnError() override { return enableRuntimeSchedulerQueueClearingOnError_; } private: - bool enableEventLoop_; bool enableRuntimeSchedulerQueueClearingOnError_; }; diff --git a/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.cpp b/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.cpp index 7ea5fc3c782f..71a4d652abaf 100644 --- a/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.cpp +++ b/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.cpp @@ -40,8 +40,7 @@ Scheduler::Scheduler( auto performanceEntryReporter = PerformanceEntryReporter::getInstance(); performanceEntryReporter_ = performanceEntryReporter; - if (ReactNativeFeatureFlags::enableBridgelessArchitecture() && - ReactNativeFeatureFlags::cdpInteractionMetricsEnabled()) { + if (ReactNativeFeatureFlags::cdpInteractionMetricsEnabled()) { cdpMetricsReporter_.emplace(CdpMetricsReporter{runtimeExecutor_}); performanceEntryReporter_->addEventListener(&*cdpMetricsReporter_); } diff --git a/packages/react-native/ReactCommon/react/renderer/scheduler/tests/SchedulerDelegateInvalidationTest.cpp b/packages/react-native/ReactCommon/react/renderer/scheduler/tests/SchedulerDelegateInvalidationTest.cpp index 9ebdf08fc762..7fec08cc74b2 100644 --- a/packages/react-native/ReactCommon/react/renderer/scheduler/tests/SchedulerDelegateInvalidationTest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/scheduler/tests/SchedulerDelegateInvalidationTest.cpp @@ -201,11 +201,6 @@ class TestExecutorQueue { // - enableRuntimeSchedulerQueueClearingOnError: a RuntimeScheduler_Modern // fallback that drops queued work before host error handling tears down the // delegate. -// - enableBridgelessArchitecture: forced ON so the Scheduler picks -// RuntimeScheduler_Modern. Modern queues rendering updates in -// pendingRenderingUpdates_ and drains them at end-of-tick, which is the -// ordering required to expose the race. RuntimeScheduler_Legacy runs -// scheduleRenderingUpdate inline, collapsing the window we want to test. class TestFeatureFlags : public ReactNativeFeatureFlagsDefaults { public: explicit TestFeatureFlags( @@ -214,9 +209,6 @@ class TestFeatureFlags : public ReactNativeFeatureFlagsDefaults { : guardEnabled_(guardEnabled), queueClearingOnErrorEnabled_(queueClearingOnErrorEnabled) {} - bool enableBridgelessArchitecture() override { - return true; - } bool enableRuntimeSchedulerQueueClearingOnError() override { return queueClearingOnErrorEnabled_; } diff --git a/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp b/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp index 0615b05e9975..8c0081b76e2c 100644 --- a/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp +++ b/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp @@ -391,8 +391,6 @@ namespace { void defineReactInstanceFlags( jsi::Runtime& runtime, const ReactInstance::JSRuntimeFlags& options) noexcept { - defineReadOnlyGlobal(runtime, "RN$Bridgeless", jsi::Value(true)); - if (options.isProfiling) { defineReadOnlyGlobal(runtime, "__RCTProfileIsProfiling", jsi::Value(true)); } diff --git a/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp b/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp index d843a8338aeb..628117dea9b5 100644 --- a/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp +++ b/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp @@ -70,8 +70,7 @@ std::unique_ptr HermesInstance::createJSRuntime( ::hermes::vm::RuntimeConfig::Builder() .withGCConfig(gcConfig.build()) .withEnableSampleProfiling(true) - .withMicrotaskQueue( - ReactNativeFeatureFlags::enableBridgelessArchitecture()); + .withMicrotaskQueue(true); if (crashManager) { runtimeConfigBuilder.withCrashMgr(crashManager); diff --git a/packages/react-native/ReactCommon/react/runtime/tests/cxx/ReactInstanceTest.cpp b/packages/react-native/ReactCommon/react/runtime/tests/cxx/ReactInstanceTest.cpp index 0c6aeb3f3a51..b63253e36419 100644 --- a/packages/react-native/ReactCommon/react/runtime/tests/cxx/ReactInstanceTest.cpp +++ b/packages/react-native/ReactCommon/react/runtime/tests/cxx/ReactInstanceTest.cpp @@ -223,14 +223,6 @@ class ReactInstanceTest : public ::testing::Test { std::shared_ptr errorHandler_; }; -TEST_F(ReactInstanceTest, testBridgelessFlagIsSet) { - auto valBefore = tryEval("RN$Bridgeless === true", "false"); - EXPECT_EQ(valBefore.getBool(), false); - initializeRuntimeWithScript(""); - auto val = eval("RN$Bridgeless === true"); - EXPECT_EQ(val.getBool(), true); -} - TEST_F(ReactInstanceTest, testProfilingFlag) { auto valBefore = tryEval("__RCTProfileIsProfiling === true", "false"); EXPECT_EQ(valBefore.getBool(), false); diff --git a/packages/react-native/flow/global.js b/packages/react-native/flow/global.js index dc6de666ec02..953632ae5836 100644 --- a/packages/react-native/flow/global.js +++ b/packages/react-native/flow/global.js @@ -77,7 +77,6 @@ declare var global: { // Internal-specific +__DEV__?: boolean, - +RN$Bridgeless?: boolean, // setupDOM +DOMRect: typeof DOMRect, diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index c976861c56b4..6220609e81b5 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -65,7 +65,7 @@ const definitions: FeatureFlagDefinitions = { metadata: { dateAdded: '2025-07-16', description: - 'Enable emitting of InteractionEntry live metrics to the debugger. Requires `enableBridgelessArchitecture`.', + 'Enable emitting of InteractionEntry live metrics to the debugger.', expectedReleaseValue: true, purpose: 'experimentation', }, @@ -191,15 +191,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'none', }, - enableBridgelessArchitecture: { - defaultValue: false, - metadata: { - description: 'Feature flag to enable the new bridgeless architecture.', - expectedReleaseValue: true, - purpose: 'release', - }, - ossReleaseStage: 'canary', - }, enableCppPropsIteratorSetter: { defaultValue: false, metadata: { @@ -662,7 +653,7 @@ const definitions: FeatureFlagDefinitions = { metadata: { dateAdded: '2024-01-31', description: - 'Enable network inspection support in the React Native DevTools CDP backend. Requires `enableBridgelessArchitecture`. This flag is global and should not be changed across React Host lifetimes.', + 'Enable network inspection support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes.', expectedReleaseValue: true, purpose: 'experimentation', }, diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 5e77c1dbd663..42e416fa2125 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<1f78266600508274a623ff1032fa7124>> + * @generated SignedSource<<527e3d55349291b6a6b66a6da9e1e74e>> * @flow strict * @noformat */ @@ -60,7 +60,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ enableAccessibilityOrder: Getter, enableAccumulatedUpdatesInRawPropsAndroid: Getter, enableAndroidTextMeasurementOptimizations: Getter, - enableBridgelessArchitecture: Getter, enableCppPropsIteratorSetter: Getter, enableCustomFocusSearchOnClippedElementsAndroid: Getter, enableDestroyShadowTreeRevisionAsync: Getter, @@ -205,7 +204,7 @@ export const commonTestFlag: Getter = createNativeFlagGetter('commonTes */ export const commonTestFlagWithoutNativeImplementation: Getter = createNativeFlagGetter('commonTestFlagWithoutNativeImplementation', false); /** - * Enable emitting of InteractionEntry live metrics to the debugger. Requires `enableBridgelessArchitecture`. + * Enable emitting of InteractionEntry live metrics to the debugger. */ export const cdpInteractionMetricsEnabled: Getter = createNativeFlagGetter('cdpInteractionMetricsEnabled', false); /** @@ -252,10 +251,6 @@ export const enableAccumulatedUpdatesInRawPropsAndroid: Getter = create * Enables various optimizations throughout the path of measuring text on Android. */ export const enableAndroidTextMeasurementOptimizations: Getter = createNativeFlagGetter('enableAndroidTextMeasurementOptimizations', false); -/** - * Feature flag to enable the new bridgeless architecture. - */ -export const enableBridgelessArchitecture: Getter = createNativeFlagGetter('enableBridgelessArchitecture', false); /** * Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java). */ @@ -429,7 +424,7 @@ export const fuseboxEnabledRelease: Getter = createNativeFlagGetter('fu */ export const fuseboxFrameRecordingEnabled: Getter = createNativeFlagGetter('fuseboxFrameRecordingEnabled', false); /** - * Enable network inspection support in the React Native DevTools CDP backend. Requires `enableBridgelessArchitecture`. This flag is global and should not be changed across React Host lifetimes. + * Enable network inspection support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes. */ export const fuseboxNetworkInspectionEnabled: Getter = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', true); /** diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlagsBase.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlagsBase.js index c27f2f2e022f..548ab9bb8f2a 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlagsBase.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlagsBase.js @@ -106,8 +106,7 @@ export function setOverrides( } const reportedConfigNames: Set = new Set(); -const hasTurboModules = - global.RN$Bridgeless === true || global.__turboModuleProxy != null; +const hasTurboModules = true; function maybeLogUnavailableNativeModuleError(configName: string): void { if ( diff --git a/packages/react-native/src/private/featureflags/__tests__/ReactNativeFeatureFlags-test.js b/packages/react-native/src/private/featureflags/__tests__/ReactNativeFeatureFlags-test.js index aec3e31bf3e8..42a0fd81c068 100644 --- a/packages/react-native/src/private/featureflags/__tests__/ReactNativeFeatureFlags-test.js +++ b/packages/react-native/src/private/featureflags/__tests__/ReactNativeFeatureFlags-test.js @@ -138,21 +138,7 @@ describe('ReactNativeFeatureFlags', () => { }); describe('when the native module is NOT available', () => { - let originalBridgelessValue; - - beforeEach(() => { - originalBridgelessValue = global.RN$Bridgeless; - }); - - afterEach(() => { - // $FlowExpectedError[cannot-write] - global.RN$Bridgeless = originalBridgelessValue; - }); - - it('should provide default values for common flags and log an error if TurboModules are available', () => { - // $FlowExpectedError[cannot-write] - global.RN$Bridgeless = true; - + it('should provide default values for common flags and log an error', () => { const ReactNativeFeatureFlags = require('../ReactNativeFeatureFlags'); expect(ReactNativeFeatureFlags.commonTestFlag()).toBe(false); @@ -161,15 +147,5 @@ describe('ReactNativeFeatureFlags', () => { "Could not access feature flag 'commonTestFlag' because native module method was not available", ); }); - - it('should provide default values for common flags and NOT log an error if TurboModules are NOT available', () => { - // $FlowExpectedError[cannot-write] - global.RN$Bridgeless = false; - - const ReactNativeFeatureFlags = require('../ReactNativeFeatureFlags'); - expect(ReactNativeFeatureFlags.commonTestFlag()).toBe(false); - - expect(console.error).not.toHaveBeenCalled(); - }); }); }); diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index a72acea15a4b..ef58c8e2fd57 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<869507719729d76403ed47be393cc120>> + * @generated SignedSource<<2d1d88f371b8e0fb31bbbe4a295db088>> * @flow strict * @noformat */ @@ -38,7 +38,6 @@ export interface Spec extends TurboModule { +enableAccessibilityOrder?: () => boolean; +enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean; +enableAndroidTextMeasurementOptimizations?: () => boolean; - +enableBridgelessArchitecture?: () => boolean; +enableCppPropsIteratorSetter?: () => boolean; +enableCustomFocusSearchOnClippedElementsAndroid?: () => boolean; +enableDestroyShadowTreeRevisionAsync?: () => boolean; diff --git a/packages/rn-tester/js/RNTesterAppShared.js b/packages/rn-tester/js/RNTesterAppShared.js index 6a53954e3df6..ee430fc2b3b6 100644 --- a/packages/rn-tester/js/RNTesterAppShared.js +++ b/packages/rn-tester/js/RNTesterAppShared.js @@ -42,8 +42,8 @@ import { useWindowDimensions, } from 'react-native'; -// In Bridgeless mode, in dev, enable static view config validator -if (global.RN$Bridgeless === true && __DEV__) { +// In dev, enable static view config validator +if (__DEV__) { NativeComponentRegistry.setRuntimeConfigProvider(() => { return { native: false, diff --git a/packages/rn-tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js b/packages/rn-tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js index 25515e2063d0..860d504b4fe4 100644 --- a/packages/rn-tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js +++ b/packages/rn-tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js @@ -295,11 +295,6 @@ class NativeCxxModuleExampleExample extends React.Component<{}, State> { } componentDidMount(): void { - if (global.__turboModuleProxy == null && global.RN$Bridgeless == null) { - throw new Error( - 'Cannot load this example because TurboModule is not configured.', - ); - } if (NativeCxxModuleExample) { this.eventSubscriptions.push( NativeCxxModuleExample.onPress(value => console.log('onPress: ()')), diff --git a/packages/rn-tester/js/examples/TurboModule/SampleTurboModuleExample.js b/packages/rn-tester/js/examples/TurboModule/SampleTurboModuleExample.js index c1c5803c06c1..0f9955873ab3 100644 --- a/packages/rn-tester/js/examples/TurboModule/SampleTurboModuleExample.js +++ b/packages/rn-tester/js/examples/TurboModule/SampleTurboModuleExample.js @@ -203,12 +203,6 @@ class SampleTurboModuleExample extends React.Component<{}, State> { } componentDidMount(): void { - if (global.__turboModuleProxy == null && global.RN$Bridgeless == null) { - throw new Error( - 'Cannot load this example because TurboModule is not configured.', - ); - } - // Lazily load the module NativeSampleTurboModule.getConstants(); if (global.__SampleTurboModuleJSIBindings !== 'Hello JSI!') { diff --git a/private/react-native-fantom/tester/src/main.cpp b/private/react-native-fantom/tester/src/main.cpp index eacc70cd73b2..5afcf85db0ba 100644 --- a/private/react-native-fantom/tester/src/main.cpp +++ b/private/react-native-fantom/tester/src/main.cpp @@ -26,7 +26,6 @@ static void setUpLogging() { static void setUpFeatureFlags() { folly::dynamic dynamicFeatureFlags = folly::dynamic::object(); - dynamicFeatureFlags["enableBridgelessArchitecture"] = true; dynamicFeatureFlags["cxxNativeAnimatedEnabled"] = true; if (AppSettings::dynamicFeatureFlags.has_value()) {