Cleanup completeReactInstanceCreationOnBgThreadOnAndroid and useImmediateExecutorInAndroidBridgeless flags (#48916)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48916

Cleaning up this feature flag since we no longer require this gating. This was already fulled rulled out as default.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68621578

fbshipit-source-id: 3fd3ad007b8beb8e2525ffa7b4da372be1dbbd94
This commit is contained in:
Pieter De Baets
2025-01-24 10:57:41 -08:00
committed by Facebook GitHub Bot
parent b186d8f9b8
commit 7f62ff6b02
21 changed files with 75 additions and 342 deletions
@@ -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<<b859be47c2d48d62aff10ad54de36e55>>
* @generated SignedSource<<ee8592f9694f255c1f16e847db87cefe>>
*/
/**
@@ -34,12 +34,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun commonTestFlag(): Boolean = accessor.commonTestFlag()
/**
* Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
*/
@JvmStatic
public fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean = accessor.completeReactInstanceCreationOnBgThreadOnAndroid()
/**
* Prevent FabricMountingManager from reordering mountitems, which may lead to invalid state on the UI thread
*/
@@ -250,12 +244,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun useFabricInterop(): Boolean = accessor.useFabricInterop()
/**
* Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization
*/
@JvmStatic
public fun useImmediateExecutorInAndroidBridgeless(): Boolean = accessor.useImmediateExecutorInAndroidBridgeless()
/**
* When enabled, the native view configs are used in bridgeless mode.
*/
@@ -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<<abef684a503f04c2af679c9a0d71fb94>>
* @generated SignedSource<<9e914ad3b6c5e588c65fc4ff189299f4>>
*/
/**
@@ -21,7 +21,6 @@ package com.facebook.react.internal.featureflags
internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccessor {
private var commonTestFlagCache: Boolean? = null
private var completeReactInstanceCreationOnBgThreadOnAndroidCache: Boolean? = null
private var disableMountItemReorderingAndroidCache: Boolean? = null
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
private var enableBridgelessArchitectureCache: Boolean? = null
@@ -57,7 +56,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
private var useFabricInteropCache: Boolean? = null
private var useImmediateExecutorInAndroidBridgelessCache: Boolean? = null
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
private var useOptimisedViewPreallocationOnAndroidCache: Boolean? = null
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
@@ -75,15 +73,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean {
var cached = completeReactInstanceCreationOnBgThreadOnAndroidCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.completeReactInstanceCreationOnBgThreadOnAndroid()
completeReactInstanceCreationOnBgThreadOnAndroidCache = cached
}
return cached
}
override fun disableMountItemReorderingAndroid(): Boolean {
var cached = disableMountItemReorderingAndroidCache
if (cached == null) {
@@ -399,15 +388,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun useImmediateExecutorInAndroidBridgeless(): Boolean {
var cached = useImmediateExecutorInAndroidBridgelessCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.useImmediateExecutorInAndroidBridgeless()
useImmediateExecutorInAndroidBridgelessCache = cached
}
return cached
}
override fun useNativeViewConfigsInBridgelessMode(): Boolean {
var cached = useNativeViewConfigsInBridgelessModeCache
if (cached == null) {
@@ -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<<e78c96fa240965844d5b9142e58e448e>>
* @generated SignedSource<<de387611b8d57f9c468a641c1eec6e09>>
*/
/**
@@ -30,8 +30,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun commonTestFlag(): Boolean
@DoNotStrip @JvmStatic public external fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean
@DoNotStrip @JvmStatic public external fun disableMountItemReorderingAndroid(): Boolean
@DoNotStrip @JvmStatic public external fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean
@@ -102,8 +100,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun useFabricInterop(): Boolean
@DoNotStrip @JvmStatic public external fun useImmediateExecutorInAndroidBridgeless(): Boolean
@DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean
@DoNotStrip @JvmStatic public external fun useOptimisedViewPreallocationOnAndroid(): Boolean
@@ -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<<2d28a6cd8bce4cb845511749e46a6695>>
* @generated SignedSource<<60faf8d807eeec68261bffb84bb3794b>>
*/
/**
@@ -25,8 +25,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun commonTestFlag(): Boolean = false
override fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean = true
override fun disableMountItemReorderingAndroid(): Boolean = false
override fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean = false
@@ -97,8 +95,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun useFabricInterop(): Boolean = false
override fun useImmediateExecutorInAndroidBridgeless(): Boolean = true
override fun useNativeViewConfigsInBridgelessMode(): Boolean = false
override fun useOptimisedViewPreallocationOnAndroid(): Boolean = false
@@ -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<<196d9ffaf89a44b190d2513c0a1fb0e1>>
* @generated SignedSource<<2074a87060761850c6d619aaac40e0cf>>
*/
/**
@@ -25,7 +25,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private val accessedFeatureFlags = mutableSetOf<String>()
private var commonTestFlagCache: Boolean? = null
private var completeReactInstanceCreationOnBgThreadOnAndroidCache: Boolean? = null
private var disableMountItemReorderingAndroidCache: Boolean? = null
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
private var enableBridgelessArchitectureCache: Boolean? = null
@@ -61,7 +60,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
private var useFabricInteropCache: Boolean? = null
private var useImmediateExecutorInAndroidBridgelessCache: Boolean? = null
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
private var useOptimisedViewPreallocationOnAndroidCache: Boolean? = null
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
@@ -80,16 +78,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean {
var cached = completeReactInstanceCreationOnBgThreadOnAndroidCache
if (cached == null) {
cached = currentProvider.completeReactInstanceCreationOnBgThreadOnAndroid()
accessedFeatureFlags.add("completeReactInstanceCreationOnBgThreadOnAndroid")
completeReactInstanceCreationOnBgThreadOnAndroidCache = cached
}
return cached
}
override fun disableMountItemReorderingAndroid(): Boolean {
var cached = disableMountItemReorderingAndroidCache
if (cached == null) {
@@ -440,16 +428,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun useImmediateExecutorInAndroidBridgeless(): Boolean {
var cached = useImmediateExecutorInAndroidBridgelessCache
if (cached == null) {
cached = currentProvider.useImmediateExecutorInAndroidBridgeless()
accessedFeatureFlags.add("useImmediateExecutorInAndroidBridgeless")
useImmediateExecutorInAndroidBridgelessCache = cached
}
return cached
}
override fun useNativeViewConfigsInBridgelessMode(): Boolean {
var cached = useNativeViewConfigsInBridgelessModeCache
if (cached == null) {
@@ -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<<2c72645e0cfcb38493bc9daddfb8cd06>>
* @generated SignedSource<<8c953d87b8fb25b0d52ddd916312a1d9>>
*/
/**
@@ -25,8 +25,6 @@ import com.facebook.proguard.annotations.DoNotStrip
public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun commonTestFlag(): Boolean
@DoNotStrip public fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean
@DoNotStrip public fun disableMountItemReorderingAndroid(): Boolean
@DoNotStrip public fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean
@@ -97,8 +95,6 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun useFabricInterop(): Boolean
@DoNotStrip public fun useImmediateExecutorInAndroidBridgeless(): Boolean
@DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean
@DoNotStrip public fun useOptimisedViewPreallocationOnAndroid(): Boolean
@@ -1026,12 +1026,6 @@ public class ReactHostImpl implements ReactHost {
TAG, new ReactNoCrashSoftException(method + ": " + message, throwable));
}
private Executor getDefaultReactInstanceExecutor() {
return ReactNativeFeatureFlags.useImmediateExecutorInAndroidBridgeless()
? Task.IMMEDIATE_EXECUTOR
: mBGExecutor;
}
/** Schedule work on a ReactInstance that is already created. */
private Task<Boolean> callWithExistingReactInstance(
final String callingMethod,
@@ -1040,17 +1034,14 @@ public class ReactHostImpl implements ReactHost {
final String method = "callWithExistingReactInstance(" + callingMethod + ")";
if (executor == null) {
executor = getDefaultReactInstanceExecutor();
executor = Task.IMMEDIATE_EXECUTOR;
}
return mCreateReactInstanceTaskRef
.get()
.onSuccess(
task -> {
final ReactInstance reactInstance =
ReactNativeFeatureFlags.completeReactInstanceCreationOnBgThreadOnAndroid()
? task.getResult()
: mReactInstance;
final ReactInstance reactInstance = task.getResult();
if (reactInstance == null) {
raiseSoftException(method, "Execute: reactInstance is null. Dropping work.");
return FALSE;
@@ -1070,16 +1061,13 @@ public class ReactHostImpl implements ReactHost {
final String method = "callAfterGetOrCreateReactInstance(" + callingMethod + ")";
if (executor == null) {
executor = getDefaultReactInstanceExecutor();
executor = Task.IMMEDIATE_EXECUTOR;
}
return getOrCreateReactInstance()
.onSuccess(
task -> {
final ReactInstance reactInstance =
ReactNativeFeatureFlags.completeReactInstanceCreationOnBgThreadOnAndroid()
? task.getResult()
: mReactInstance;
final ReactInstance reactInstance = task.getResult();
if (reactInstance == null) {
raiseSoftException(method, "Execute: reactInstance is null. Dropping work.");
return null;
@@ -1280,13 +1268,9 @@ public class ReactHostImpl implements ReactHost {
return reactInstance;
};
if (ReactNativeFeatureFlags.completeReactInstanceCreationOnBgThreadOnAndroid()) {
creationTask.onSuccess(lifecycleUpdateTask, mUIExecutor);
return creationTask.onSuccess(
task -> task.getResult().mInstance, Task.IMMEDIATE_EXECUTOR);
} else {
return creationTask.onSuccess(lifecycleUpdateTask, mUIExecutor);
}
creationTask.onSuccess(lifecycleUpdateTask, mUIExecutor);
return creationTask.onSuccess(
task -> task.getResult().mInstance, Task.IMMEDIATE_EXECUTOR);
});
}
@@ -1480,12 +1464,10 @@ public class ReactHostImpl implements ReactHost {
if (mReloadTask == null) {
// When using the immediate executor, we want to avoid scheduling any further work immediately
// when destruction is kicked off.
Task<ReactInstance> createTask =
ReactNativeFeatureFlags.completeReactInstanceCreationOnBgThreadOnAndroid()
? mCreateReactInstanceTaskRef.getAndReset()
: mCreateReactInstanceTaskRef.get();
log(method, "Resetting createReactInstance task ref");
mReloadTask =
createTask
mCreateReactInstanceTaskRef
.getAndReset()
.continueWithTask(
(task) -> {
log(method, "Starting React Native reload");
@@ -1570,14 +1552,6 @@ public class ReactHostImpl implements ReactHost {
reactInstance.destroy();
}
// Originally, we reset the instance task ref quite late, leading to potential
// racing invocations while shutting down
if (!ReactNativeFeatureFlags
.completeReactInstanceCreationOnBgThreadOnAndroid()) {
log(method, "Resetting createReactInstance task ref");
mCreateReactInstanceTaskRef.reset();
}
log(method, "Resetting start task ref");
mStartTask = null;
@@ -1656,13 +1630,10 @@ public class ReactHostImpl implements ReactHost {
if (mDestroyTask == null) {
// When using the immediate executor, we want to avoid scheduling any further work immediately
// when destruction is kicked off.
Task<ReactInstance> createTask =
ReactNativeFeatureFlags.completeReactInstanceCreationOnBgThreadOnAndroid()
? mCreateReactInstanceTaskRef.getAndReset()
: mCreateReactInstanceTaskRef.get();
log(method, "Resetting createReactInstance task ref");
mDestroyTask =
createTask
mCreateReactInstanceTaskRef
.getAndReset()
.continueWithTask(
task -> {
log(method, "Starting React Native destruction");
@@ -1768,14 +1739,6 @@ public class ReactHostImpl implements ReactHost {
reactInstance.destroy();
}
// Originally, we reset the instance task ref quite late, leading to potential
// racing invocations while shutting down
if (!ReactNativeFeatureFlags
.completeReactInstanceCreationOnBgThreadOnAndroid()) {
log(method, "Resetting createReactInstance task ref");
mCreateReactInstanceTaskRef.reset();
}
log(method, "Resetting start task ref");
mStartTask = null;
@@ -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<<35a44d924111dbbb305ede64ae34d9c9>>
* @generated SignedSource<<0535dda0566486d4f985019bec2020cc>>
*/
/**
@@ -45,12 +45,6 @@ class ReactNativeFeatureFlagsProviderHolder
return method(javaProvider_);
}
bool completeReactInstanceCreationOnBgThreadOnAndroid() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("completeReactInstanceCreationOnBgThreadOnAndroid");
return method(javaProvider_);
}
bool disableMountItemReorderingAndroid() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("disableMountItemReorderingAndroid");
@@ -261,12 +255,6 @@ class ReactNativeFeatureFlagsProviderHolder
return method(javaProvider_);
}
bool useImmediateExecutorInAndroidBridgeless() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useImmediateExecutorInAndroidBridgeless");
return method(javaProvider_);
}
bool useNativeViewConfigsInBridgelessMode() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useNativeViewConfigsInBridgelessMode");
@@ -318,11 +306,6 @@ bool JReactNativeFeatureFlagsCxxInterop::commonTestFlag(
return ReactNativeFeatureFlags::commonTestFlag();
}
bool JReactNativeFeatureFlagsCxxInterop::completeReactInstanceCreationOnBgThreadOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::completeReactInstanceCreationOnBgThreadOnAndroid();
}
bool JReactNativeFeatureFlagsCxxInterop::disableMountItemReorderingAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::disableMountItemReorderingAndroid();
@@ -498,11 +481,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useFabricInterop(
return ReactNativeFeatureFlags::useFabricInterop();
}
bool JReactNativeFeatureFlagsCxxInterop::useImmediateExecutorInAndroidBridgeless(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::useImmediateExecutorInAndroidBridgeless();
}
bool JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode();
@@ -572,9 +550,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"commonTestFlag",
JReactNativeFeatureFlagsCxxInterop::commonTestFlag),
makeNativeMethod(
"completeReactInstanceCreationOnBgThreadOnAndroid",
JReactNativeFeatureFlagsCxxInterop::completeReactInstanceCreationOnBgThreadOnAndroid),
makeNativeMethod(
"disableMountItemReorderingAndroid",
JReactNativeFeatureFlagsCxxInterop::disableMountItemReorderingAndroid),
@@ -680,9 +655,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"useFabricInterop",
JReactNativeFeatureFlagsCxxInterop::useFabricInterop),
makeNativeMethod(
"useImmediateExecutorInAndroidBridgeless",
JReactNativeFeatureFlagsCxxInterop::useImmediateExecutorInAndroidBridgeless),
makeNativeMethod(
"useNativeViewConfigsInBridgelessMode",
JReactNativeFeatureFlagsCxxInterop::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<<4730b94d0b393d0b2fb03e880e285cf8>>
* @generated SignedSource<<55065c8f506e80d82183546c6f8bb886>>
*/
/**
@@ -33,9 +33,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool commonTestFlag(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool completeReactInstanceCreationOnBgThreadOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool disableMountItemReorderingAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -141,9 +138,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool useFabricInterop(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool useImmediateExecutorInAndroidBridgeless(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool useNativeViewConfigsInBridgelessMode(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -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<<e61788da17c41c55876a8b63d7b4a85f>>
* @generated SignedSource<<9e1ad3e6933a841b71af755966c94dce>>
*/
/**
@@ -30,10 +30,6 @@ bool ReactNativeFeatureFlags::commonTestFlag() {
return getAccessor().commonTestFlag();
}
bool ReactNativeFeatureFlags::completeReactInstanceCreationOnBgThreadOnAndroid() {
return getAccessor().completeReactInstanceCreationOnBgThreadOnAndroid();
}
bool ReactNativeFeatureFlags::disableMountItemReorderingAndroid() {
return getAccessor().disableMountItemReorderingAndroid();
}
@@ -174,10 +170,6 @@ bool ReactNativeFeatureFlags::useFabricInterop() {
return getAccessor().useFabricInterop();
}
bool ReactNativeFeatureFlags::useImmediateExecutorInAndroidBridgeless() {
return getAccessor().useImmediateExecutorInAndroidBridgeless();
}
bool ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode() {
return getAccessor().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<<592c874bdb2eb8ace8dd0f95ccb0024a>>
* @generated SignedSource<<59af4f5d1270c6ac473e53ea554666f8>>
*/
/**
@@ -44,11 +44,6 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool commonTestFlag();
/**
* Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
*/
RN_EXPORT static bool completeReactInstanceCreationOnBgThreadOnAndroid();
/**
* Prevent FabricMountingManager from reordering mountitems, which may lead to invalid state on the UI thread
*/
@@ -224,11 +219,6 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool useFabricInterop();
/**
* Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization
*/
RN_EXPORT static bool useImmediateExecutorInAndroidBridgeless();
/**
* When enabled, the native view configs are used in bridgeless mode.
*/
@@ -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<<b55d6290a2cd9c29e2f044523a3490f8>>
* @generated SignedSource<<1c6836e592ea1255b07c8c1d7846bb19>>
*/
/**
@@ -47,24 +47,6 @@ bool ReactNativeFeatureFlagsAccessor::commonTestFlag() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::completeReactInstanceCreationOnBgThreadOnAndroid() {
auto flagValue = completeReactInstanceCreationOnBgThreadOnAndroid_.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(1, "completeReactInstanceCreationOnBgThreadOnAndroid");
flagValue = currentProvider_->completeReactInstanceCreationOnBgThreadOnAndroid();
completeReactInstanceCreationOnBgThreadOnAndroid_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::disableMountItemReorderingAndroid() {
auto flagValue = disableMountItemReorderingAndroid_.load();
@@ -74,7 +56,7 @@ bool ReactNativeFeatureFlagsAccessor::disableMountItemReorderingAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(2, "disableMountItemReorderingAndroid");
markFlagAsAccessed(1, "disableMountItemReorderingAndroid");
flagValue = currentProvider_->disableMountItemReorderingAndroid();
disableMountItemReorderingAndroid_ = flagValue;
@@ -92,7 +74,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAccumulatedUpdatesInRawPropsAndroid(
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(3, "enableAccumulatedUpdatesInRawPropsAndroid");
markFlagAsAccessed(2, "enableAccumulatedUpdatesInRawPropsAndroid");
flagValue = currentProvider_->enableAccumulatedUpdatesInRawPropsAndroid();
enableAccumulatedUpdatesInRawPropsAndroid_ = flagValue;
@@ -110,7 +92,7 @@ bool ReactNativeFeatureFlagsAccessor::enableBridgelessArchitecture() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(4, "enableBridgelessArchitecture");
markFlagAsAccessed(3, "enableBridgelessArchitecture");
flagValue = currentProvider_->enableBridgelessArchitecture();
enableBridgelessArchitecture_ = flagValue;
@@ -128,7 +110,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(5, "enableCppPropsIteratorSetter");
markFlagAsAccessed(4, "enableCppPropsIteratorSetter");
flagValue = currentProvider_->enableCppPropsIteratorSetter();
enableCppPropsIteratorSetter_ = flagValue;
@@ -146,7 +128,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(6, "enableEagerRootViewAttachment");
markFlagAsAccessed(5, "enableEagerRootViewAttachment");
flagValue = currentProvider_->enableEagerRootViewAttachment();
enableEagerRootViewAttachment_ = flagValue;
@@ -164,7 +146,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEventEmitterRetentionDuringGesturesO
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(7, "enableEventEmitterRetentionDuringGesturesOnAndroid");
markFlagAsAccessed(6, "enableEventEmitterRetentionDuringGesturesOnAndroid");
flagValue = currentProvider_->enableEventEmitterRetentionDuringGesturesOnAndroid();
enableEventEmitterRetentionDuringGesturesOnAndroid_ = flagValue;
@@ -182,7 +164,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(8, "enableFabricLogs");
markFlagAsAccessed(7, "enableFabricLogs");
flagValue = currentProvider_->enableFabricLogs();
enableFabricLogs_ = flagValue;
@@ -200,7 +182,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricRenderer() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(9, "enableFabricRenderer");
markFlagAsAccessed(8, "enableFabricRenderer");
flagValue = currentProvider_->enableFabricRenderer();
enableFabricRenderer_ = flagValue;
@@ -218,7 +200,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFixForViewCommandRace() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(10, "enableFixForViewCommandRace");
markFlagAsAccessed(9, "enableFixForViewCommandRace");
flagValue = currentProvider_->enableFixForViewCommandRace();
enableFixForViewCommandRace_ = flagValue;
@@ -236,7 +218,7 @@ bool ReactNativeFeatureFlagsAccessor::enableGranularShadowTreeStateReconciliatio
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(11, "enableGranularShadowTreeStateReconciliation");
markFlagAsAccessed(10, "enableGranularShadowTreeStateReconciliation");
flagValue = currentProvider_->enableGranularShadowTreeStateReconciliation();
enableGranularShadowTreeStateReconciliation_ = flagValue;
@@ -254,7 +236,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(12, "enableIOSViewClipToPaddingBox");
markFlagAsAccessed(11, "enableIOSViewClipToPaddingBox");
flagValue = currentProvider_->enableIOSViewClipToPaddingBox();
enableIOSViewClipToPaddingBox_ = flagValue;
@@ -272,7 +254,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(13, "enableImagePrefetchingAndroid");
markFlagAsAccessed(12, "enableImagePrefetchingAndroid");
flagValue = currentProvider_->enableImagePrefetchingAndroid();
enableImagePrefetchingAndroid_ = flagValue;
@@ -290,7 +272,7 @@ bool ReactNativeFeatureFlagsAccessor::enableJSRuntimeGCOnMemoryPressureOnIOS() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(14, "enableJSRuntimeGCOnMemoryPressureOnIOS");
markFlagAsAccessed(13, "enableJSRuntimeGCOnMemoryPressureOnIOS");
flagValue = currentProvider_->enableJSRuntimeGCOnMemoryPressureOnIOS();
enableJSRuntimeGCOnMemoryPressureOnIOS_ = flagValue;
@@ -308,7 +290,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(15, "enableLayoutAnimationsOnAndroid");
markFlagAsAccessed(14, "enableLayoutAnimationsOnAndroid");
flagValue = currentProvider_->enableLayoutAnimationsOnAndroid();
enableLayoutAnimationsOnAndroid_ = flagValue;
@@ -326,7 +308,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(16, "enableLayoutAnimationsOnIOS");
markFlagAsAccessed(15, "enableLayoutAnimationsOnIOS");
flagValue = currentProvider_->enableLayoutAnimationsOnIOS();
enableLayoutAnimationsOnIOS_ = flagValue;
@@ -344,7 +326,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLongTaskAPI() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(17, "enableLongTaskAPI");
markFlagAsAccessed(16, "enableLongTaskAPI");
flagValue = currentProvider_->enableLongTaskAPI();
enableLongTaskAPI_ = flagValue;
@@ -362,7 +344,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNewBackgroundAndBorderDrawables() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(18, "enableNewBackgroundAndBorderDrawables");
markFlagAsAccessed(17, "enableNewBackgroundAndBorderDrawables");
flagValue = currentProvider_->enableNewBackgroundAndBorderDrawables();
enableNewBackgroundAndBorderDrawables_ = flagValue;
@@ -380,7 +362,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreciseSchedulingForPremountItemsOnA
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(19, "enablePreciseSchedulingForPremountItemsOnAndroid");
markFlagAsAccessed(18, "enablePreciseSchedulingForPremountItemsOnAndroid");
flagValue = currentProvider_->enablePreciseSchedulingForPremountItemsOnAndroid();
enablePreciseSchedulingForPremountItemsOnAndroid_ = flagValue;
@@ -398,7 +380,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(20, "enablePropsUpdateReconciliationAndroid");
markFlagAsAccessed(19, "enablePropsUpdateReconciliationAndroid");
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
enablePropsUpdateReconciliationAndroid_ = flagValue;
@@ -416,7 +398,7 @@ bool ReactNativeFeatureFlagsAccessor::enableReportEventPaintTime() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(21, "enableReportEventPaintTime");
markFlagAsAccessed(20, "enableReportEventPaintTime");
flagValue = currentProvider_->enableReportEventPaintTime();
enableReportEventPaintTime_ = flagValue;
@@ -434,7 +416,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSynchronousStateUpdates() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(22, "enableSynchronousStateUpdates");
markFlagAsAccessed(21, "enableSynchronousStateUpdates");
flagValue = currentProvider_->enableSynchronousStateUpdates();
enableSynchronousStateUpdates_ = flagValue;
@@ -452,7 +434,7 @@ bool ReactNativeFeatureFlagsAccessor::enableUIConsistency() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(23, "enableUIConsistency");
markFlagAsAccessed(22, "enableUIConsistency");
flagValue = currentProvider_->enableUIConsistency();
enableUIConsistency_ = flagValue;
@@ -470,7 +452,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(24, "enableViewRecycling");
markFlagAsAccessed(23, "enableViewRecycling");
flagValue = currentProvider_->enableViewRecycling();
enableViewRecycling_ = flagValue;
@@ -488,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::excludeYogaFromRawProps() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(25, "excludeYogaFromRawProps");
markFlagAsAccessed(24, "excludeYogaFromRawProps");
flagValue = currentProvider_->excludeYogaFromRawProps();
excludeYogaFromRawProps_ = flagValue;
@@ -506,7 +488,7 @@ bool ReactNativeFeatureFlagsAccessor::fixDifferentiatorEmittingUpdatesWithWrongP
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(26, "fixDifferentiatorEmittingUpdatesWithWrongParentTag");
markFlagAsAccessed(25, "fixDifferentiatorEmittingUpdatesWithWrongParentTag");
flagValue = currentProvider_->fixDifferentiatorEmittingUpdatesWithWrongParentTag();
fixDifferentiatorEmittingUpdatesWithWrongParentTag_ = flagValue;
@@ -524,7 +506,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(27, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
markFlagAsAccessed(26, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
@@ -542,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMountingCoordinatorReportedPendingTrans
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(28, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid");
markFlagAsAccessed(27, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid");
flagValue = currentProvider_->fixMountingCoordinatorReportedPendingTransactionsOnAndroid();
fixMountingCoordinatorReportedPendingTransactionsOnAndroid_ = flagValue;
@@ -560,7 +542,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(29, "fuseboxEnabledRelease");
markFlagAsAccessed(28, "fuseboxEnabledRelease");
flagValue = currentProvider_->fuseboxEnabledRelease();
fuseboxEnabledRelease_ = flagValue;
@@ -578,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::initEagerTurboModulesOnNativeModulesQueueA
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(30, "initEagerTurboModulesOnNativeModulesQueueAndroid");
markFlagAsAccessed(29, "initEagerTurboModulesOnNativeModulesQueueAndroid");
flagValue = currentProvider_->initEagerTurboModulesOnNativeModulesQueueAndroid();
initEagerTurboModulesOnNativeModulesQueueAndroid_ = flagValue;
@@ -596,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::lazyAnimationCallbacks() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(31, "lazyAnimationCallbacks");
markFlagAsAccessed(30, "lazyAnimationCallbacks");
flagValue = currentProvider_->lazyAnimationCallbacks();
lazyAnimationCallbacks_ = flagValue;
@@ -614,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::loadVectorDrawablesOnImages() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(32, "loadVectorDrawablesOnImages");
markFlagAsAccessed(31, "loadVectorDrawablesOnImages");
flagValue = currentProvider_->loadVectorDrawablesOnImages();
loadVectorDrawablesOnImages_ = flagValue;
@@ -632,7 +614,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(33, "traceTurboModulePromiseRejectionsOnAndroid");
markFlagAsAccessed(32, "traceTurboModulePromiseRejectionsOnAndroid");
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
@@ -650,7 +632,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(34, "useAlwaysAvailableJSErrorHandling");
markFlagAsAccessed(33, "useAlwaysAvailableJSErrorHandling");
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
useAlwaysAvailableJSErrorHandling_ = flagValue;
@@ -668,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::useEditTextStockAndroidFocusBehavior() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(35, "useEditTextStockAndroidFocusBehavior");
markFlagAsAccessed(34, "useEditTextStockAndroidFocusBehavior");
flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior();
useEditTextStockAndroidFocusBehavior_ = flagValue;
@@ -686,7 +668,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(36, "useFabricInterop");
markFlagAsAccessed(35, "useFabricInterop");
flagValue = currentProvider_->useFabricInterop();
useFabricInterop_ = flagValue;
@@ -695,24 +677,6 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::useImmediateExecutorInAndroidBridgeless() {
auto flagValue = useImmediateExecutorInAndroidBridgeless_.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(37, "useImmediateExecutorInAndroidBridgeless");
flagValue = currentProvider_->useImmediateExecutorInAndroidBridgeless();
useImmediateExecutorInAndroidBridgeless_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
auto flagValue = useNativeViewConfigsInBridgelessMode_.load();
@@ -722,7 +686,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(38, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(36, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -740,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimisedViewPreallocationOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(39, "useOptimisedViewPreallocationOnAndroid");
markFlagAsAccessed(37, "useOptimisedViewPreallocationOnAndroid");
flagValue = currentProvider_->useOptimisedViewPreallocationOnAndroid();
useOptimisedViewPreallocationOnAndroid_ = flagValue;
@@ -758,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(40, "useOptimizedEventBatchingOnAndroid");
markFlagAsAccessed(38, "useOptimizedEventBatchingOnAndroid");
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
useOptimizedEventBatchingOnAndroid_ = flagValue;
@@ -776,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(41, "useRawPropsJsiValue");
markFlagAsAccessed(39, "useRawPropsJsiValue");
flagValue = currentProvider_->useRawPropsJsiValue();
useRawPropsJsiValue_ = flagValue;
@@ -794,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdate() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(42, "useRuntimeShadowNodeReferenceUpdate");
markFlagAsAccessed(40, "useRuntimeShadowNodeReferenceUpdate");
flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdate();
useRuntimeShadowNodeReferenceUpdate_ = flagValue;
@@ -812,7 +776,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(43, "useTurboModuleInterop");
markFlagAsAccessed(41, "useTurboModuleInterop");
flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
@@ -830,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(44, "useTurboModules");
markFlagAsAccessed(42, "useTurboModules");
flagValue = currentProvider_->useTurboModules();
useTurboModules_ = flagValue;
@@ -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<<2085eda6113da5e28dcdad0f9e040057>>
* @generated SignedSource<<10b3a54e8e4d9b57382659544c5afbd6>>
*/
/**
@@ -33,7 +33,6 @@ class ReactNativeFeatureFlagsAccessor {
ReactNativeFeatureFlagsAccessor();
bool commonTestFlag();
bool completeReactInstanceCreationOnBgThreadOnAndroid();
bool disableMountItemReorderingAndroid();
bool enableAccumulatedUpdatesInRawPropsAndroid();
bool enableBridgelessArchitecture();
@@ -69,7 +68,6 @@ class ReactNativeFeatureFlagsAccessor {
bool useAlwaysAvailableJSErrorHandling();
bool useEditTextStockAndroidFocusBehavior();
bool useFabricInterop();
bool useImmediateExecutorInAndroidBridgeless();
bool useNativeViewConfigsInBridgelessMode();
bool useOptimisedViewPreallocationOnAndroid();
bool useOptimizedEventBatchingOnAndroid();
@@ -88,10 +86,9 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 45> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 43> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> completeReactInstanceCreationOnBgThreadOnAndroid_;
std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
std::atomic<std::optional<bool>> enableAccumulatedUpdatesInRawPropsAndroid_;
std::atomic<std::optional<bool>> enableBridgelessArchitecture_;
@@ -127,7 +124,6 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> useAlwaysAvailableJSErrorHandling_;
std::atomic<std::optional<bool>> useEditTextStockAndroidFocusBehavior_;
std::atomic<std::optional<bool>> useFabricInterop_;
std::atomic<std::optional<bool>> useImmediateExecutorInAndroidBridgeless_;
std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
std::atomic<std::optional<bool>> useOptimisedViewPreallocationOnAndroid_;
std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
@@ -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<<1561312f88deb1ecd0d103138b524c0a>>
* @generated SignedSource<<a52e542f52e9570338bf11c6182cf16c>>
*/
/**
@@ -31,10 +31,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool completeReactInstanceCreationOnBgThreadOnAndroid() override {
return true;
}
bool disableMountItemReorderingAndroid() override {
return false;
}
@@ -175,10 +171,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool useImmediateExecutorInAndroidBridgeless() override {
return true;
}
bool useNativeViewConfigsInBridgelessMode() override {
return false;
}
@@ -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<<a75e261b0b9536b96ec3c0189484a4ea>>
* @generated SignedSource<<d5ddf2e383134f63d850e727261b985f>>
*/
/**
@@ -54,15 +54,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::commonTestFlag();
}
bool completeReactInstanceCreationOnBgThreadOnAndroid() override {
auto value = values_["completeReactInstanceCreationOnBgThreadOnAndroid"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::completeReactInstanceCreationOnBgThreadOnAndroid();
}
bool disableMountItemReorderingAndroid() override {
auto value = values_["disableMountItemReorderingAndroid"];
if (!value.isNull()) {
@@ -378,15 +369,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::useFabricInterop();
}
bool useImmediateExecutorInAndroidBridgeless() override {
auto value = values_["useImmediateExecutorInAndroidBridgeless"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::useImmediateExecutorInAndroidBridgeless();
}
bool useNativeViewConfigsInBridgelessMode() override {
auto value = values_["useNativeViewConfigsInBridgelessMode"];
if (!value.isNull()) {
@@ -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<<3a9e67f5e7dac1a071122981eedb4c9b>>
* @generated SignedSource<<d785287e6dcf16124e3458a7a23e5d89>>
*/
/**
@@ -26,7 +26,6 @@ class ReactNativeFeatureFlagsProvider {
virtual ~ReactNativeFeatureFlagsProvider() = default;
virtual bool commonTestFlag() = 0;
virtual bool completeReactInstanceCreationOnBgThreadOnAndroid() = 0;
virtual bool disableMountItemReorderingAndroid() = 0;
virtual bool enableAccumulatedUpdatesInRawPropsAndroid() = 0;
virtual bool enableBridgelessArchitecture() = 0;
@@ -62,7 +61,6 @@ class ReactNativeFeatureFlagsProvider {
virtual bool useAlwaysAvailableJSErrorHandling() = 0;
virtual bool useEditTextStockAndroidFocusBehavior() = 0;
virtual bool useFabricInterop() = 0;
virtual bool useImmediateExecutorInAndroidBridgeless() = 0;
virtual bool useNativeViewConfigsInBridgelessMode() = 0;
virtual bool useOptimisedViewPreallocationOnAndroid() = 0;
virtual bool useOptimizedEventBatchingOnAndroid() = 0;
@@ -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<<46dda28edd6e2354c572df6d36a7300a>>
* @generated SignedSource<<32bb00f45e56fa422c0e611b14809e22>>
*/
/**
@@ -49,11 +49,6 @@ bool NativeReactNativeFeatureFlags::commonTestFlagWithoutNativeImplementation(
return false;
}
bool NativeReactNativeFeatureFlags::completeReactInstanceCreationOnBgThreadOnAndroid(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::completeReactInstanceCreationOnBgThreadOnAndroid();
}
bool NativeReactNativeFeatureFlags::disableEventLoopOnBridgeless(
jsi::Runtime& /*runtime*/) {
// This flag is configured with `skipNativeAPI: true`.
@@ -236,11 +231,6 @@ bool NativeReactNativeFeatureFlags::useFabricInterop(
return ReactNativeFeatureFlags::useFabricInterop();
}
bool NativeReactNativeFeatureFlags::useImmediateExecutorInAndroidBridgeless(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::useImmediateExecutorInAndroidBridgeless();
}
bool NativeReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::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<<6339f7995b2e2d11ad363194daf85ddf>>
* @generated SignedSource<<ae16dfe1e65d5acbd38e3c405d932c63>>
*/
/**
@@ -39,8 +39,6 @@ class NativeReactNativeFeatureFlags
bool commonTestFlagWithoutNativeImplementation(jsi::Runtime& runtime);
bool completeReactInstanceCreationOnBgThreadOnAndroid(jsi::Runtime& runtime);
bool disableEventLoopOnBridgeless(jsi::Runtime& runtime);
bool disableMountItemReorderingAndroid(jsi::Runtime& runtime);
@@ -113,8 +111,6 @@ class NativeReactNativeFeatureFlags
bool useFabricInterop(jsi::Runtime& runtime);
bool useImmediateExecutorInAndroidBridgeless(jsi::Runtime& runtime);
bool useNativeViewConfigsInBridgelessMode(jsi::Runtime& runtime);
bool useOptimisedViewPreallocationOnAndroid(jsi::Runtime& runtime);
@@ -57,15 +57,6 @@ const testDefinitions: FeatureFlagDefinitions = {
const definitions: FeatureFlagDefinitions = {
common: {
...testDefinitions.common,
completeReactInstanceCreationOnBgThreadOnAndroid: {
defaultValue: true,
metadata: {
description:
'Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android',
expectedReleaseValue: true,
purpose: 'release',
},
},
disableEventLoopOnBridgeless: {
defaultValue: false,
metadata: {
@@ -407,15 +398,6 @@ const definitions: FeatureFlagDefinitions = {
purpose: 'release',
},
},
useImmediateExecutorInAndroidBridgeless: {
defaultValue: true,
metadata: {
description:
'Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization',
expectedReleaseValue: true,
purpose: 'release',
},
},
useNativeViewConfigsInBridgelessMode: {
defaultValue: false,
metadata: {
@@ -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<<d9e44ddbf1972707fbf74659c41fe151>>
* @generated SignedSource<<ea4436bf1a65e580a085fbbd093f2b59>>
* @flow strict
*/
@@ -48,7 +48,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
...ReactNativeFeatureFlagsJsOnly,
commonTestFlag: Getter<boolean>,
commonTestFlagWithoutNativeImplementation: Getter<boolean>,
completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
disableEventLoopOnBridgeless: Getter<boolean>,
disableMountItemReorderingAndroid: Getter<boolean>,
enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
@@ -85,7 +84,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
useAlwaysAvailableJSErrorHandling: Getter<boolean>,
useEditTextStockAndroidFocusBehavior: Getter<boolean>,
useFabricInterop: Getter<boolean>,
useImmediateExecutorInAndroidBridgeless: Getter<boolean>,
useNativeViewConfigsInBridgelessMode: Getter<boolean>,
useOptimisedViewPreallocationOnAndroid: Getter<boolean>,
useOptimizedEventBatchingOnAndroid: Getter<boolean>,
@@ -168,10 +166,6 @@ export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTes
* Common flag for testing (without native implementation). Do NOT modify.
*/
export const commonTestFlagWithoutNativeImplementation: Getter<boolean> = createNativeFlagGetter('commonTestFlagWithoutNativeImplementation', false);
/**
* 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', true);
/**
* The bridgeless architecture enables the event loop by default. This feature flag allows us to force disabling it in specific instances.
*/
@@ -316,10 +310,6 @@ export const useEditTextStockAndroidFocusBehavior: Getter<boolean> = createNativ
* Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
*/
export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabricInterop', false);
/**
* Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization
*/
export const useImmediateExecutorInAndroidBridgeless: Getter<boolean> = createNativeFlagGetter('useImmediateExecutorInAndroidBridgeless', true);
/**
* When enabled, the native view configs are used in bridgeless mode.
*/
@@ -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<<4166e9dbea09d5f514be276d56cc2fb3>>
* @generated SignedSource<<255740c94e6ff49fee95a54f7e4b0375>>
* @flow strict
*/
@@ -25,7 +25,6 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
export interface Spec extends TurboModule {
+commonTestFlag?: () => boolean;
+commonTestFlagWithoutNativeImplementation?: () => boolean;
+completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
+disableEventLoopOnBridgeless?: () => boolean;
+disableMountItemReorderingAndroid?: () => boolean;
+enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean;
@@ -62,7 +61,6 @@ export interface Spec extends TurboModule {
+useAlwaysAvailableJSErrorHandling?: () => boolean;
+useEditTextStockAndroidFocusBehavior?: () => boolean;
+useFabricInterop?: () => boolean;
+useImmediateExecutorInAndroidBridgeless?: () => boolean;
+useNativeViewConfigsInBridgelessMode?: () => boolean;
+useOptimisedViewPreallocationOnAndroid?: () => boolean;
+useOptimizedEventBatchingOnAndroid?: () => boolean;