mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Change default for bridgeless-init related feature flags (#47567)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47567 Changelog: [Android][Changed] Invocations to JS will now invoke their callbacks immediately if the instance is ready. Surface starts will not wait for the main thread to become available to dispatch the work in JS. Reviewed By: rshest Differential Revision: D65661888 fbshipit-source-id: c67802bd56fac6bc6c145b96d823274e2b97de69
This commit is contained in:
committed by
Facebook GitHub Bot
parent
663b5f9d19
commit
9fa4845136
+3
-3
@@ -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<<d2d9a8abf3e0be78bbe20c44fce1011d>>
|
||||
* @generated SignedSource<<608eece71b01769be0df8731774f9b0a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -27,7 +27,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun allowRecursiveCommitsWithSynchronousMountOnAndroid(): Boolean = false
|
||||
|
||||
override fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean = false
|
||||
override fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean = true
|
||||
|
||||
override fun disableEventLoopOnBridgeless(): Boolean = false
|
||||
|
||||
@@ -101,7 +101,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun useFabricInterop(): Boolean = false
|
||||
|
||||
override fun useImmediateExecutorInAndroidBridgeless(): Boolean = false
|
||||
override fun useImmediateExecutorInAndroidBridgeless(): Boolean = true
|
||||
|
||||
override fun useNativeViewConfigsInBridgelessMode(): Boolean = false
|
||||
|
||||
|
||||
+3
-3
@@ -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<<50402601a833b4a74d39733dcbd9ef65>>
|
||||
* @generated SignedSource<<eb86662c826d52dc1fb97d1bdb95766a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -36,7 +36,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
}
|
||||
|
||||
bool completeReactInstanceCreationOnBgThreadOnAndroid() override {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool disableEventLoopOnBridgeless() override {
|
||||
@@ -184,7 +184,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
}
|
||||
|
||||
bool useImmediateExecutorInAndroidBridgeless() override {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool useNativeViewConfigsInBridgelessMode() override {
|
||||
|
||||
@@ -64,12 +64,11 @@ const definitions: FeatureFlagDefinitions = {
|
||||
},
|
||||
},
|
||||
completeReactInstanceCreationOnBgThreadOnAndroid: {
|
||||
defaultValue: false,
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
dateAdded: '2024-07-22',
|
||||
description:
|
||||
'Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android',
|
||||
purpose: 'experimentation',
|
||||
purpose: 'release',
|
||||
},
|
||||
},
|
||||
disableEventLoopOnBridgeless: {
|
||||
@@ -377,12 +376,11 @@ const definitions: FeatureFlagDefinitions = {
|
||||
},
|
||||
},
|
||||
useImmediateExecutorInAndroidBridgeless: {
|
||||
defaultValue: false,
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
dateAdded: '2024-06-06',
|
||||
description:
|
||||
'Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization',
|
||||
purpose: 'experimentation',
|
||||
purpose: 'release',
|
||||
},
|
||||
},
|
||||
useNativeViewConfigsInBridgelessMode: {
|
||||
|
||||
@@ -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<<ee28bd585298c2e510a11433b64c76a9>>
|
||||
* @generated SignedSource<<09b8ae3840a5ad419c4af9f3fcc8deec>>
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
@@ -199,7 +199,7 @@ export const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>
|
||||
/**
|
||||
* Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
|
||||
*/
|
||||
export const completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean> = createNativeFlagGetter('completeReactInstanceCreationOnBgThreadOnAndroid', false);
|
||||
export const completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean> = createNativeFlagGetter('completeReactInstanceCreationOnBgThreadOnAndroid', true);
|
||||
/**
|
||||
* The bridgeless architecture enables the event loop by default. This feature flag allows us to force disabling it in specific instances.
|
||||
*/
|
||||
@@ -347,7 +347,7 @@ export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabr
|
||||
/**
|
||||
* Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization
|
||||
*/
|
||||
export const useImmediateExecutorInAndroidBridgeless: Getter<boolean> = createNativeFlagGetter('useImmediateExecutorInAndroidBridgeless', false);
|
||||
export const useImmediateExecutorInAndroidBridgeless: Getter<boolean> = createNativeFlagGetter('useImmediateExecutorInAndroidBridgeless', true);
|
||||
/**
|
||||
* When enabled, the native view configs are used in bridgeless mode.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user