Remove enableEagerMainQueueModulesOnIOS, make eager main-queue setup always-on (#56933)

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

The `enableEagerMainQueueModulesOnIOS` runtime gate has finished rollout and is no longer needed. Drop the flag from the feature-flag config, regenerate the per-language accessors, and inline the previously-gated body in `RCTInstance._start` so the eager main-queue module setup always runs. Also drops the now-dead override and trims the test that exercised the flag-off branch.

After this change, when `RCTInstance` starts up, it always consults `RCTInstanceDelegate.unstableModulesRequiringMainQueueSetup`, initializes the returned modules on the main queue, and blocks the JS thread on that completion before evaluating the bundle.

Changelog:
[iOS][Changed] - Native modules listed in `unstableModulesRequiringMainQueueSetup` are now always initialized eagerly on the main queue during React Native init; the previous `enableEagerMainQueueModulesOnIOS` opt-in flag has been removed.

Reviewed By: sammy-SC

Differential Revision: D105954235

fbshipit-source-id: a662d43e606f215647fb86a87a62fe123c003360
This commit is contained in:
Pieter De Baets authored and meta-codesync[bot] committed 2026-05-22 09:46:18 -07:00
1 parent c5afd1a204
commit 36bec56b0b
22 files changed
+112 -262

No files matched your search

@@ -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<<fb433838ff712ffa7b045065a35723f2>>
* @generated SignedSource<<3e8cc4e23730f3171824faaf2053bbd9>>
*/
/**
@@ -144,12 +144,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enableDoubleMeasurementFixAndroid(): Boolean = accessor.enableDoubleMeasurementFixAndroid()
/**
* This infra allows native modules to initialize on the main thread, during React Native init.
*/
@JvmStatic
public fun enableEagerMainQueueModulesOnIOS(): Boolean = accessor.enableEagerMainQueueModulesOnIOS()
/**
* Feature flag to configure eager attachment of the root view/initialisation of the JS code.
*/
@@ -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<<1ac9ff65ae410a6b1afa6c92c2e9a86b>>
* @generated SignedSource<<1b877147588a851daaee1a2b4494312a>>
*/
/**
@@ -39,7 +39,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableDestroyShadowTreeRevisionAsyncCache: Boolean? = null
private var enableDifferentiatorMutationVectorPreallocationCache: Boolean? = null
private var enableDoubleMeasurementFixAndroidCache: Boolean? = null
private var enableEagerMainQueueModulesOnIOSCache: Boolean? = null
private var enableEagerRootViewAttachmentCache: Boolean? = null
private var enableExclusivePropsUpdateAndroidCache: Boolean? = null
private var enableFabricCommitBranchingCache: Boolean? = null
@@ -281,15 +280,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun enableEagerMainQueueModulesOnIOS(): Boolean {
var cached = enableEagerMainQueueModulesOnIOSCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.enableEagerMainQueueModulesOnIOS()
enableEagerMainQueueModulesOnIOSCache = cached
}
return cached
}
override fun enableEagerRootViewAttachment(): Boolean {
var cached = enableEagerRootViewAttachmentCache
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<<b63f95bdb6536ae1623bb4a69f2c4940>>
* @generated SignedSource<<a09de0b0d4b342796ff3fcc1b52fc53a>>
*/
/**
@@ -66,8 +66,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun enableDoubleMeasurementFixAndroid(): Boolean
@DoNotStrip @JvmStatic public external fun enableEagerMainQueueModulesOnIOS(): Boolean
@DoNotStrip @JvmStatic public external fun enableEagerRootViewAttachment(): Boolean
@DoNotStrip @JvmStatic public external fun enableExclusivePropsUpdateAndroid(): 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<<960de240ad648acc1dca10a80e2bf8a5>>
* @generated SignedSource<<b08dd880f47d31353cd29e4bcc63090d>>
*/
/**
@@ -61,8 +61,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun enableDoubleMeasurementFixAndroid(): Boolean = false
override fun enableEagerMainQueueModulesOnIOS(): Boolean = false
override fun enableEagerRootViewAttachment(): Boolean = false
override fun enableExclusivePropsUpdateAndroid(): 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<<39d4538c638e38cbd1655064edc74761>>
* @generated SignedSource<<c3cb6a890e22fe2ac279c3a9aa65b096>>
*/
/**
@@ -43,7 +43,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableDestroyShadowTreeRevisionAsyncCache: Boolean? = null
private var enableDifferentiatorMutationVectorPreallocationCache: Boolean? = null
private var enableDoubleMeasurementFixAndroidCache: Boolean? = null
private var enableEagerMainQueueModulesOnIOSCache: Boolean? = null
private var enableEagerRootViewAttachmentCache: Boolean? = null
private var enableExclusivePropsUpdateAndroidCache: Boolean? = null
private var enableFabricCommitBranchingCache: Boolean? = null
@@ -304,16 +303,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun enableEagerMainQueueModulesOnIOS(): Boolean {
var cached = enableEagerMainQueueModulesOnIOSCache
if (cached == null) {
cached = currentProvider.enableEagerMainQueueModulesOnIOS()
accessedFeatureFlags.add("enableEagerMainQueueModulesOnIOS")
enableEagerMainQueueModulesOnIOSCache = cached
}
return cached
}
override fun enableEagerRootViewAttachment(): Boolean {
var cached = enableEagerRootViewAttachmentCache
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<<4fa46d585a2fe3515557bf06f0e1189f>>
* @generated SignedSource<<1348346948cf4212dd312c48b5bfe917>>
*/
/**
@@ -61,8 +61,6 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun enableDoubleMeasurementFixAndroid(): Boolean
@DoNotStrip public fun enableEagerMainQueueModulesOnIOS(): Boolean
@DoNotStrip public fun enableEagerRootViewAttachment(): Boolean
@DoNotStrip public fun enableExclusivePropsUpdateAndroid(): 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<<e289807a5e54422b373acc929ce31e10>>
* @generated SignedSource<<ed750080bd0e891a1a11887afb7d7c01>>
*/
/**
@@ -153,12 +153,6 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}
bool enableEagerMainQueueModulesOnIOS() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableEagerMainQueueModulesOnIOS");
return method(javaProvider_);
}
bool enableEagerRootViewAttachment() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableEagerRootViewAttachment");
@@ -672,11 +666,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableDoubleMeasurementFixAndroid(
return ReactNativeFeatureFlags::enableDoubleMeasurementFixAndroid();
}
bool JReactNativeFeatureFlagsCxxInterop::enableEagerMainQueueModulesOnIOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableEagerMainQueueModulesOnIOS();
}
bool JReactNativeFeatureFlagsCxxInterop::enableEagerRootViewAttachment(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableEagerRootViewAttachment();
@@ -1110,9 +1099,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableDoubleMeasurementFixAndroid",
JReactNativeFeatureFlagsCxxInterop::enableDoubleMeasurementFixAndroid),
makeNativeMethod(
"enableEagerMainQueueModulesOnIOS",
JReactNativeFeatureFlagsCxxInterop::enableEagerMainQueueModulesOnIOS),
makeNativeMethod(
"enableEagerRootViewAttachment",
JReactNativeFeatureFlagsCxxInterop::enableEagerRootViewAttachment),
@@ -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<<8e51c38f988854dd63291df26a78326e>>
* @generated SignedSource<<21e508305ffc719768389f668485e57f>>
*/
/**
@@ -87,9 +87,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool enableDoubleMeasurementFixAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enableEagerMainQueueModulesOnIOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enableEagerRootViewAttachment(
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<<a6fff34229abbd9beaa08bf39b379610>>
* @generated SignedSource<<a65763987ba462f3c46cd84dc8d75713>>
*/
/**
@@ -102,10 +102,6 @@ bool ReactNativeFeatureFlags::enableDoubleMeasurementFixAndroid() {
return getAccessor().enableDoubleMeasurementFixAndroid();
}
bool ReactNativeFeatureFlags::enableEagerMainQueueModulesOnIOS() {
return getAccessor().enableEagerMainQueueModulesOnIOS();
}
bool ReactNativeFeatureFlags::enableEagerRootViewAttachment() {
return getAccessor().enableEagerRootViewAttachment();
}
@@ -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<<6508c960d2b27f479ecb40056d5c7997>>
* @generated SignedSource<<e068e0576073bda38f2f86f80306ee93>>
*/
/**
@@ -134,11 +134,6 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enableDoubleMeasurementFixAndroid();
/**
* This infra allows native modules to initialize on the main thread, during React Native init.
*/
RN_EXPORT static bool enableEagerMainQueueModulesOnIOS();
/**
* Feature flag to configure eager attachment of the root view/initialisation of the JS code.
*/
@@ -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<<741c9218697690640831ca2e47090938>>
* @generated SignedSource<<c3f47b6ffc93782cc87265274a5a1488>>
*/
/**
@@ -371,24 +371,6 @@ bool ReactNativeFeatureFlagsAccessor::enableDoubleMeasurementFixAndroid() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::enableEagerMainQueueModulesOnIOS() {
auto flagValue = enableEagerMainQueueModulesOnIOS_.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(19, "enableEagerMainQueueModulesOnIOS");
flagValue = currentProvider_->enableEagerMainQueueModulesOnIOS();
enableEagerMainQueueModulesOnIOS_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::enableEagerRootViewAttachment() {
auto flagValue = enableEagerRootViewAttachment_.load();
@@ -398,7 +380,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(20, "enableEagerRootViewAttachment");
markFlagAsAccessed(19, "enableEagerRootViewAttachment");
flagValue = currentProvider_->enableEagerRootViewAttachment();
enableEagerRootViewAttachment_ = flagValue;
@@ -416,7 +398,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(21, "enableExclusivePropsUpdateAndroid");
markFlagAsAccessed(20, "enableExclusivePropsUpdateAndroid");
flagValue = currentProvider_->enableExclusivePropsUpdateAndroid();
enableExclusivePropsUpdateAndroid_ = flagValue;
@@ -434,7 +416,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(22, "enableFabricCommitBranching");
markFlagAsAccessed(21, "enableFabricCommitBranching");
flagValue = currentProvider_->enableFabricCommitBranching();
enableFabricCommitBranching_ = flagValue;
@@ -452,7 +434,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(23, "enableFabricLogs");
markFlagAsAccessed(22, "enableFabricLogs");
flagValue = currentProvider_->enableFabricLogs();
enableFabricLogs_ = flagValue;
@@ -470,7 +452,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(24, "enableFontScaleChangesUpdatingLayout");
markFlagAsAccessed(23, "enableFontScaleChangesUpdatingLayout");
flagValue = currentProvider_->enableFontScaleChangesUpdatingLayout();
enableFontScaleChangesUpdatingLayout_ = flagValue;
@@ -488,7 +470,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(25, "enableIOSTextBaselineOffsetPerLine");
markFlagAsAccessed(24, "enableIOSTextBaselineOffsetPerLine");
flagValue = currentProvider_->enableIOSTextBaselineOffsetPerLine();
enableIOSTextBaselineOffsetPerLine_ = flagValue;
@@ -506,7 +488,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(26, "enableIOSViewClipToPaddingBox");
markFlagAsAccessed(25, "enableIOSViewClipToPaddingBox");
flagValue = currentProvider_->enableIOSViewClipToPaddingBox();
enableIOSViewClipToPaddingBox_ = flagValue;
@@ -524,7 +506,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(27, "enableImagePrefetchingAndroid");
markFlagAsAccessed(26, "enableImagePrefetchingAndroid");
flagValue = currentProvider_->enableImagePrefetchingAndroid();
enableImagePrefetchingAndroid_ = 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::enableMainQueueCoordinatorOnIOS() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(35, "enableMainQueueCoordinatorOnIOS");
markFlagAsAccessed(34, "enableMainQueueCoordinatorOnIOS");
flagValue = currentProvider_->enableMainQueueCoordinatorOnIOS();
enableMainQueueCoordinatorOnIOS_ = flagValue;
@@ -686,7 +668,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(36, "enableModuleArgumentNSNullConversionIOS");
markFlagAsAccessed(35, "enableModuleArgumentNSNullConversionIOS");
flagValue = currentProvider_->enableModuleArgumentNSNullConversionIOS();
enableModuleArgumentNSNullConversionIOS_ = flagValue;
@@ -704,7 +686,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(37, "enableMutationObserverByDefault");
markFlagAsAccessed(36, "enableMutationObserverByDefault");
flagValue = currentProvider_->enableMutationObserverByDefault();
enableMutationObserverByDefault_ = flagValue;
@@ -722,7 +704,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(38, "enableNativeCSSParsing");
markFlagAsAccessed(37, "enableNativeCSSParsing");
flagValue = currentProvider_->enableNativeCSSParsing();
enableNativeCSSParsing_ = flagValue;
@@ -740,7 +722,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(39, "enableNetworkEventReporting");
markFlagAsAccessed(38, "enableNetworkEventReporting");
flagValue = currentProvider_->enableNetworkEventReporting();
enableNetworkEventReporting_ = flagValue;
@@ -758,7 +740,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(40, "enablePreparedTextLayout");
markFlagAsAccessed(39, "enablePreparedTextLayout");
flagValue = currentProvider_->enablePreparedTextLayout();
enablePreparedTextLayout_ = flagValue;
@@ -776,7 +758,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(41, "enablePropsUpdateReconciliationAndroid");
markFlagAsAccessed(40, "enablePropsUpdateReconciliationAndroid");
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
enablePropsUpdateReconciliationAndroid_ = flagValue;
@@ -794,7 +776,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(42, "enableRuntimeSchedulerQueueClearingOnError");
markFlagAsAccessed(41, "enableRuntimeSchedulerQueueClearingOnError");
flagValue = currentProvider_->enableRuntimeSchedulerQueueClearingOnError();
enableRuntimeSchedulerQueueClearingOnError_ = flagValue;
@@ -812,7 +794,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(43, "enableSchedulerDelegateInvalidation");
markFlagAsAccessed(42, "enableSchedulerDelegateInvalidation");
flagValue = currentProvider_->enableSchedulerDelegateInvalidation();
enableSchedulerDelegateInvalidation_ = flagValue;
@@ -830,7 +812,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(44, "enableSwiftUIBasedFilters");
markFlagAsAccessed(43, "enableSwiftUIBasedFilters");
flagValue = currentProvider_->enableSwiftUIBasedFilters();
enableSwiftUIBasedFilters_ = flagValue;
@@ -848,7 +830,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(45, "enableViewCulling");
markFlagAsAccessed(44, "enableViewCulling");
flagValue = currentProvider_->enableViewCulling();
enableViewCulling_ = flagValue;
@@ -866,7 +848,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(46, "enableViewRecycling");
markFlagAsAccessed(45, "enableViewRecycling");
flagValue = currentProvider_->enableViewRecycling();
enableViewRecycling_ = flagValue;
@@ -884,7 +866,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(47, "enableViewRecyclingForImage");
markFlagAsAccessed(46, "enableViewRecyclingForImage");
flagValue = currentProvider_->enableViewRecyclingForImage();
enableViewRecyclingForImage_ = flagValue;
@@ -902,7 +884,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(48, "enableViewRecyclingForScrollView");
markFlagAsAccessed(47, "enableViewRecyclingForScrollView");
flagValue = currentProvider_->enableViewRecyclingForScrollView();
enableViewRecyclingForScrollView_ = flagValue;
@@ -920,7 +902,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(49, "enableViewRecyclingForText");
markFlagAsAccessed(48, "enableViewRecyclingForText");
flagValue = currentProvider_->enableViewRecyclingForText();
enableViewRecyclingForText_ = flagValue;
@@ -938,7 +920,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(50, "enableViewRecyclingForView");
markFlagAsAccessed(49, "enableViewRecyclingForView");
flagValue = currentProvider_->enableViewRecyclingForView();
enableViewRecyclingForView_ = flagValue;
@@ -956,7 +938,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(51, "enableVirtualViewContainerStateExperimental");
markFlagAsAccessed(50, "enableVirtualViewContainerStateExperimental");
flagValue = currentProvider_->enableVirtualViewContainerStateExperimental();
enableVirtualViewContainerStateExperimental_ = flagValue;
@@ -974,7 +956,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewDebugFeatures() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(52, "enableVirtualViewDebugFeatures");
markFlagAsAccessed(51, "enableVirtualViewDebugFeatures");
flagValue = currentProvider_->enableVirtualViewDebugFeatures();
enableVirtualViewDebugFeatures_ = flagValue;
@@ -992,7 +974,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(53, "fixDifferentiatorParentTagForUnflattenCase");
markFlagAsAccessed(52, "fixDifferentiatorParentTagForUnflattenCase");
flagValue = currentProvider_->fixDifferentiatorParentTagForUnflattenCase();
fixDifferentiatorParentTagForUnflattenCase_ = flagValue;
@@ -1010,7 +992,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(54, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
markFlagAsAccessed(53, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
@@ -1028,7 +1010,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(55, "fixYogaFlexBasisFitContentInMainAxis");
markFlagAsAccessed(54, "fixYogaFlexBasisFitContentInMainAxis");
flagValue = currentProvider_->fixYogaFlexBasisFitContentInMainAxis();
fixYogaFlexBasisFitContentInMainAxis_ = flagValue;
@@ -1046,7 +1028,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(56, "fuseboxAssertSingleHostState");
markFlagAsAccessed(55, "fuseboxAssertSingleHostState");
flagValue = currentProvider_->fuseboxAssertSingleHostState();
fuseboxAssertSingleHostState_ = flagValue;
@@ -1064,7 +1046,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(57, "fuseboxEnabledRelease");
markFlagAsAccessed(56, "fuseboxEnabledRelease");
flagValue = currentProvider_->fuseboxEnabledRelease();
fuseboxEnabledRelease_ = flagValue;
@@ -1082,7 +1064,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(58, "fuseboxFrameRecordingEnabled");
markFlagAsAccessed(57, "fuseboxFrameRecordingEnabled");
flagValue = currentProvider_->fuseboxFrameRecordingEnabled();
fuseboxFrameRecordingEnabled_ = flagValue;
@@ -1100,7 +1082,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(59, "fuseboxNetworkInspectionEnabled");
markFlagAsAccessed(58, "fuseboxNetworkInspectionEnabled");
flagValue = currentProvider_->fuseboxNetworkInspectionEnabled();
fuseboxNetworkInspectionEnabled_ = flagValue;
@@ -1118,7 +1100,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(60, "fuseboxScreenshotCaptureEnabled");
markFlagAsAccessed(59, "fuseboxScreenshotCaptureEnabled");
flagValue = currentProvider_->fuseboxScreenshotCaptureEnabled();
fuseboxScreenshotCaptureEnabled_ = flagValue;
@@ -1136,7 +1118,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(61, "hideOffscreenVirtualViewsOnIOS");
markFlagAsAccessed(60, "hideOffscreenVirtualViewsOnIOS");
flagValue = currentProvider_->hideOffscreenVirtualViewsOnIOS();
hideOffscreenVirtualViewsOnIOS_ = flagValue;
@@ -1154,7 +1136,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(62, "optimizedAnimatedPropUpdates");
markFlagAsAccessed(61, "optimizedAnimatedPropUpdates");
flagValue = currentProvider_->optimizedAnimatedPropUpdates();
optimizedAnimatedPropUpdates_ = flagValue;
@@ -1172,7 +1154,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(63, "overrideBySynchronousMountPropsAtMountingAndroid");
markFlagAsAccessed(62, "overrideBySynchronousMountPropsAtMountingAndroid");
flagValue = currentProvider_->overrideBySynchronousMountPropsAtMountingAndroid();
overrideBySynchronousMountPropsAtMountingAndroid_ = flagValue;
@@ -1190,7 +1172,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(64, "perfIssuesEnabled");
markFlagAsAccessed(63, "perfIssuesEnabled");
flagValue = currentProvider_->perfIssuesEnabled();
perfIssuesEnabled_ = flagValue;
@@ -1208,7 +1190,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(65, "perfMonitorV2Enabled");
markFlagAsAccessed(64, "perfMonitorV2Enabled");
flagValue = currentProvider_->perfMonitorV2Enabled();
perfMonitorV2Enabled_ = flagValue;
@@ -1226,7 +1208,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(66, "preparedTextCacheSize");
markFlagAsAccessed(65, "preparedTextCacheSize");
flagValue = currentProvider_->preparedTextCacheSize();
preparedTextCacheSize_ = flagValue;
@@ -1244,7 +1226,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(67, "preventShadowTreeCommitExhaustion");
markFlagAsAccessed(66, "preventShadowTreeCommitExhaustion");
flagValue = currentProvider_->preventShadowTreeCommitExhaustion();
preventShadowTreeCommitExhaustion_ = flagValue;
@@ -1262,7 +1244,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(68, "redBoxV2Android");
markFlagAsAccessed(67, "redBoxV2Android");
flagValue = currentProvider_->redBoxV2Android();
redBoxV2Android_ = flagValue;
@@ -1280,7 +1262,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(69, "redBoxV2IOS");
markFlagAsAccessed(68, "redBoxV2IOS");
flagValue = currentProvider_->redBoxV2IOS();
redBoxV2IOS_ = flagValue;
@@ -1298,7 +1280,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(70, "shouldPressibilityUseW3CPointerEventsForHover");
markFlagAsAccessed(69, "shouldPressibilityUseW3CPointerEventsForHover");
flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover();
shouldPressibilityUseW3CPointerEventsForHover_ = flagValue;
@@ -1316,7 +1298,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(71, "shouldTriggerResponderTransferOnScrollAndroid");
markFlagAsAccessed(70, "shouldTriggerResponderTransferOnScrollAndroid");
flagValue = currentProvider_->shouldTriggerResponderTransferOnScrollAndroid();
shouldTriggerResponderTransferOnScrollAndroid_ = flagValue;
@@ -1334,7 +1316,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(72, "skipActivityIdentityAssertionOnHostPause");
markFlagAsAccessed(71, "skipActivityIdentityAssertionOnHostPause");
flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause();
skipActivityIdentityAssertionOnHostPause_ = flagValue;
@@ -1352,7 +1334,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(73, "syncAndroidClipBoundsWithOverflow");
markFlagAsAccessed(72, "syncAndroidClipBoundsWithOverflow");
flagValue = currentProvider_->syncAndroidClipBoundsWithOverflow();
syncAndroidClipBoundsWithOverflow_ = flagValue;
@@ -1370,7 +1352,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(74, "traceTurboModulePromiseRejectionsOnAndroid");
markFlagAsAccessed(73, "traceTurboModulePromiseRejectionsOnAndroid");
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
@@ -1388,7 +1370,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(75, "updateRuntimeShadowNodeReferencesOnCommit");
markFlagAsAccessed(74, "updateRuntimeShadowNodeReferencesOnCommit");
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
@@ -1406,7 +1388,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(76, "updateRuntimeShadowNodeReferencesOnCommitThread");
markFlagAsAccessed(75, "updateRuntimeShadowNodeReferencesOnCommitThread");
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommitThread();
updateRuntimeShadowNodeReferencesOnCommitThread_ = flagValue;
@@ -1424,7 +1406,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(77, "useAlwaysAvailableJSErrorHandling");
markFlagAsAccessed(76, "useAlwaysAvailableJSErrorHandling");
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
useAlwaysAvailableJSErrorHandling_ = flagValue;
@@ -1442,7 +1424,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(78, "useFabricInterop");
markFlagAsAccessed(77, "useFabricInterop");
flagValue = currentProvider_->useFabricInterop();
useFabricInterop_ = flagValue;
@@ -1460,7 +1442,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(79, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(78, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -1478,7 +1460,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(80, "useNestedScrollViewAndroid");
markFlagAsAccessed(79, "useNestedScrollViewAndroid");
flagValue = currentProvider_->useNestedScrollViewAndroid();
useNestedScrollViewAndroid_ = flagValue;
@@ -1496,7 +1478,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(81, "useOptimizedViewRegistryOnAndroid");
markFlagAsAccessed(80, "useOptimizedViewRegistryOnAndroid");
flagValue = currentProvider_->useOptimizedViewRegistryOnAndroid();
useOptimizedViewRegistryOnAndroid_ = flagValue;
@@ -1514,7 +1496,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(82, "useSharedAnimatedBackend");
markFlagAsAccessed(81, "useSharedAnimatedBackend");
flagValue = currentProvider_->useSharedAnimatedBackend();
useSharedAnimatedBackend_ = flagValue;
@@ -1532,7 +1514,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(83, "useTraitHiddenOnAndroid");
markFlagAsAccessed(82, "useTraitHiddenOnAndroid");
flagValue = currentProvider_->useTraitHiddenOnAndroid();
useTraitHiddenOnAndroid_ = flagValue;
@@ -1550,7 +1532,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(84, "useTurboModuleInterop");
markFlagAsAccessed(83, "useTurboModuleInterop");
flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
@@ -1568,7 +1550,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(85, "viewCullingOutsetRatio");
markFlagAsAccessed(84, "viewCullingOutsetRatio");
flagValue = currentProvider_->viewCullingOutsetRatio();
viewCullingOutsetRatio_ = flagValue;
@@ -1586,7 +1568,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(86, "viewTransitionEnabled");
markFlagAsAccessed(85, "viewTransitionEnabled");
flagValue = currentProvider_->viewTransitionEnabled();
viewTransitionEnabled_ = flagValue;
@@ -1604,7 +1586,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(87, "viewTransitionUseHardwareBitmapAndroid");
markFlagAsAccessed(86, "viewTransitionUseHardwareBitmapAndroid");
flagValue = currentProvider_->viewTransitionUseHardwareBitmapAndroid();
viewTransitionUseHardwareBitmapAndroid_ = flagValue;
@@ -1622,7 +1604,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(88, "virtualViewPrerenderRatio");
markFlagAsAccessed(87, "virtualViewPrerenderRatio");
flagValue = currentProvider_->virtualViewPrerenderRatio();
virtualViewPrerenderRatio_ = 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<<1bab95e3659f13124ff8f159f38fc39f>>
* @generated SignedSource<<f9d7d91647f7002892dfa26259a1f56f>>
*/
/**
@@ -51,7 +51,6 @@ class ReactNativeFeatureFlagsAccessor {
bool enableDestroyShadowTreeRevisionAsync();
bool enableDifferentiatorMutationVectorPreallocation();
bool enableDoubleMeasurementFixAndroid();
bool enableEagerMainQueueModulesOnIOS();
bool enableEagerRootViewAttachment();
bool enableExclusivePropsUpdateAndroid();
bool enableFabricCommitBranching();
@@ -132,7 +131,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 89> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 88> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
@@ -153,7 +152,6 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> enableDestroyShadowTreeRevisionAsync_;
std::atomic<std::optional<bool>> enableDifferentiatorMutationVectorPreallocation_;
std::atomic<std::optional<bool>> enableDoubleMeasurementFixAndroid_;
std::atomic<std::optional<bool>> enableEagerMainQueueModulesOnIOS_;
std::atomic<std::optional<bool>> enableEagerRootViewAttachment_;
std::atomic<std::optional<bool>> enableExclusivePropsUpdateAndroid_;
std::atomic<std::optional<bool>> enableFabricCommitBranching_;
@@ -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<<37d25a3c42a4bc9dde1665aaacd1acbd>>
* @generated SignedSource<<77b6a81816eff29de7a95ccce85bff53>>
*/
/**
@@ -103,10 +103,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool enableEagerMainQueueModulesOnIOS() override {
return false;
}
bool enableEagerRootViewAttachment() 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<<eab88ff064856e8ad3d284f73155b3e4>>
* @generated SignedSource<<8621688f8148828ddc1bded80e4484ac>>
*/
/**
@@ -216,15 +216,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::enableDoubleMeasurementFixAndroid();
}
bool enableEagerMainQueueModulesOnIOS() override {
auto value = values_["enableEagerMainQueueModulesOnIOS"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::enableEagerMainQueueModulesOnIOS();
}
bool enableEagerRootViewAttachment() override {
auto value = values_["enableEagerRootViewAttachment"];
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<<f5abdc61246d15927faab8529da3b6c5>>
* @generated SignedSource<<b3abbd2996cbb72b7b23db238e986610>>
*/
/**
@@ -44,7 +44,6 @@ class ReactNativeFeatureFlagsProvider {
virtual bool enableDestroyShadowTreeRevisionAsync() = 0;
virtual bool enableDifferentiatorMutationVectorPreallocation() = 0;
virtual bool enableDoubleMeasurementFixAndroid() = 0;
virtual bool enableEagerMainQueueModulesOnIOS() = 0;
virtual bool enableEagerRootViewAttachment() = 0;
virtual bool enableExclusivePropsUpdateAndroid() = 0;
virtual bool enableFabricCommitBranching() = 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<<c19602f633bf0881596620b2c3e28ea5>>
* @generated SignedSource<<d92bd6100efa1a3b352a5c7b654c2174>>
*/
/**
@@ -139,11 +139,6 @@ bool NativeReactNativeFeatureFlags::enableDoubleMeasurementFixAndroid(
return ReactNativeFeatureFlags::enableDoubleMeasurementFixAndroid();
}
bool NativeReactNativeFeatureFlags::enableEagerMainQueueModulesOnIOS(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::enableEagerMainQueueModulesOnIOS();
}
bool NativeReactNativeFeatureFlags::enableEagerRootViewAttachment(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::enableEagerRootViewAttachment();
@@ -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<<0aa224e971f7ed80b6194c426d59653a>>
* @generated SignedSource<<1a26271de9309c5f9c2435197e376847>>
*/
/**
@@ -74,8 +74,6 @@ class NativeReactNativeFeatureFlags
bool enableDoubleMeasurementFixAndroid(jsi::Runtime& runtime);
bool enableEagerMainQueueModulesOnIOS(jsi::Runtime& runtime);
bool enableEagerRootViewAttachment(jsi::Runtime& runtime);
bool enableExclusivePropsUpdateAndroid(jsi::Runtime& runtime);
@@ -15,25 +15,9 @@
#import <ReactCommon/RCTInstance.h>
#import <ReactCommon/RCTTurboModule.h>
#import <ReactCommon/RCTTurboModuleManager.h>
#import <react/featureflags/ReactNativeFeatureFlags.h>
#import <react/featureflags/ReactNativeFeatureFlagsDefaults.h>
using namespace facebook::react;
namespace {
class EagerMainQueueOverride : public ReactNativeFeatureFlagsDefaults {
public:
explicit EagerMainQueueOverride(bool enabled) : enabled_(enabled) {}
bool enableEagerMainQueueModulesOnIOS() override
{
return enabled_;
}
private:
bool enabled_;
};
} // namespace
@interface FakeEagerModule : NSObject <RCTBridgeModule, RCTTurboModule>
@property (class, readonly) NSCountedSet<NSString *> *initCounts;
@property (class, nullable) void (^onInit)(void);
@@ -114,7 +98,6 @@ static void (^sOnInit)(void);
- (void)setUp
{
[super setUp];
ReactNativeFeatureFlags::dangerouslyReset();
[FakeEagerModule reset];
_mockDelegate = OCMProtocolMock(@protocol(RCTInstanceDelegate));
@@ -137,7 +120,6 @@ static void (^sOnInit)(void);
[[NSNotificationCenter defaultCenter] removeObserver:_bundleLoadObserver];
_bundleLoadObserver = nil;
}
ReactNativeFeatureFlags::dangerouslyReset();
[FakeEagerModule reset];
_mockDelegate = nil;
_mockTMMDelegate = nil;
@@ -165,20 +147,8 @@ static void (^sOnInit)(void);
launchOptions:nil];
}
- (void)testFlagOff_doesNotConsultDelegate
- (void)testConsultsDelegateExactlyOnce
{
OCMReject([_mockDelegate unstableModulesRequiringMainQueueSetup]);
RCTInstance *instance = [self makeInstance];
XCTAssertEqual([FakeEagerModule.initCounts countForObject:FakeEagerModule.moduleName], 0u);
[instance invalidate];
}
- (void)testFlagOn_consultsDelegateExactlyOnce
{
ReactNativeFeatureFlags::override(std::make_unique<EagerMainQueueOverride>(true));
OCMStub([_mockDelegate unstableModulesRequiringMainQueueSetup]).andReturn(@[]);
RCTInstance *instance = [self makeInstance];
@@ -188,9 +158,8 @@ static void (^sOnInit)(void);
[instance invalidate];
}
- (void)testFlagOn_instantiatesRequestedModuleOnMainQueue
- (void)testInstantiatesRequestedModuleOnMainQueue
{
ReactNativeFeatureFlags::override(std::make_unique<EagerMainQueueOverride>(true));
OCMStub([_mockDelegate unstableModulesRequiringMainQueueSetup]).andReturn(@[ FakeEagerModule.moduleName ]);
RCTInstance *instance = [self makeInstance];
@@ -203,9 +172,8 @@ static void (^sOnInit)(void);
[instance invalidate];
}
- (void)testFlagOn_bundleLoadAwaitsMainQueueModuleSetup
- (void)testBundleLoadAwaitsMainQueueModuleSetup
{
ReactNativeFeatureFlags::override(std::make_unique<EagerMainQueueOverride>(true));
OCMStub([_mockDelegate unstableModulesRequiringMainQueueSetup]).andReturn(@[ FakeEagerModule.moduleName ]);
// Hand the instance an empty bundle the moment it asks for one. The JS thread
@@ -371,33 +371,31 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
// Initialize RCTModuleRegistry so that TurboModules can require other TurboModules.
[_bridgeModuleDecorator.moduleRegistry setTurboModuleRegistry:_turboModuleManager];
if (ReactNativeFeatureFlags::enableEagerMainQueueModulesOnIOS()) {
/**
* Some native modules need to capture uikit objects on the main thread.
* Start initializing those modules on the main queue here. The JavaScript thread
* will wait until this module init finishes, before executing the js bundle.
*/
NSArray<NSString *> *modulesRequiringMainQueueSetup = [_delegate unstableModulesRequiringMainQueueSetup];
/**
* Some native modules need to capture uikit objects on the main thread.
* Start initializing those modules on the main queue here. The JavaScript thread
* will wait until this module init finishes, before executing the js bundle.
*/
NSArray<NSString *> *modulesRequiringMainQueueSetup = [_delegate unstableModulesRequiringMainQueueSetup];
dispatch_semaphore_t moduleSetupComplete = dispatch_semaphore_create(0);
dispatch_semaphore_t moduleSetupComplete = dispatch_semaphore_create(0);
_waitUntilModuleSetupComplete = ^{
dispatch_semaphore_wait(moduleSetupComplete, DISPATCH_TIME_FOREVER);
};
_waitUntilModuleSetupComplete = ^{
dispatch_semaphore_wait(moduleSetupComplete, DISPATCH_TIME_FOREVER);
};
// TODO(T218039767): Integrate perf logging into main queue module init
RCTExecuteOnMainQueue(^{
for (NSString *moduleName in modulesRequiringMainQueueSetup) {
[self->_bridgeModuleDecorator.moduleRegistry moduleForName:[moduleName UTF8String]];
}
// TODO(T218039767): Integrate perf logging into main queue module init
RCTExecuteOnMainQueue(^{
for (NSString *moduleName in modulesRequiringMainQueueSetup) {
[self->_bridgeModuleDecorator.moduleRegistry moduleForName:[moduleName UTF8String]];
}
RCTScreenSize();
RCTScreenScale();
RCTSwitchSize();
RCTScreenSize();
RCTScreenScale();
RCTSwitchSize();
dispatch_semaphore_signal(moduleSetupComplete);
});
}
dispatch_semaphore_signal(moduleSetupComplete);
});
RCTLogSetBridgelessModuleRegistry(_bridgeModuleDecorator.moduleRegistry);
RCTLogSetBridgelessCallableJSModules(_bridgeModuleDecorator.callableJSModules);
@@ -253,16 +253,6 @@ const definitions: FeatureFlagDefinitions = {
},
ossReleaseStage: 'none',
},
enableEagerMainQueueModulesOnIOS: {
defaultValue: false,
metadata: {
description:
'This infra allows native modules to initialize on the main thread, during React Native init.',
expectedReleaseValue: true,
purpose: 'release',
},
ossReleaseStage: 'none',
},
enableEagerRootViewAttachment: {
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<<1d2fba4cafe542180a63997159b5cd2a>>
* @generated SignedSource<<17cac2c987328cb01ab6321fe7670cc5>>
* @flow strict
* @noformat
*/
@@ -65,7 +65,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
enableDestroyShadowTreeRevisionAsync: Getter<boolean>,
enableDifferentiatorMutationVectorPreallocation: Getter<boolean>,
enableDoubleMeasurementFixAndroid: Getter<boolean>,
enableEagerMainQueueModulesOnIOS: Getter<boolean>,
enableEagerRootViewAttachment: Getter<boolean>,
enableExclusivePropsUpdateAndroid: Getter<boolean>,
enableFabricCommitBranching: Getter<boolean>,
@@ -272,10 +271,6 @@ export const enableDifferentiatorMutationVectorPreallocation: Getter<boolean> =
* When enabled a subset of components will avoid double measurement on Android.
*/
export const enableDoubleMeasurementFixAndroid: Getter<boolean> = createNativeFlagGetter('enableDoubleMeasurementFixAndroid', false);
/**
* This infra allows native modules to initialize on the main thread, during React Native init.
*/
export const enableEagerMainQueueModulesOnIOS: Getter<boolean> = createNativeFlagGetter('enableEagerMainQueueModulesOnIOS', false);
/**
* Feature flag to configure eager attachment of the root view/initialisation of the JS code.
*/
@@ -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<<c511e258f6ede1746fd8547cb774db5e>>
* @generated SignedSource<<ba2b6d1fb38bdb754817169614234b2a>>
* @flow strict
* @noformat
*/
@@ -44,7 +44,6 @@ export interface Spec extends TurboModule {
+enableDestroyShadowTreeRevisionAsync?: () => boolean;
+enableDifferentiatorMutationVectorPreallocation?: () => boolean;
+enableDoubleMeasurementFixAndroid?: () => boolean;
+enableEagerMainQueueModulesOnIOS?: () => boolean;
+enableEagerRootViewAttachment?: () => boolean;
+enableExclusivePropsUpdateAndroid?: () => boolean;
+enableFabricCommitBranching?: () => boolean;