ship fix for view commands race everywhere (#49465)

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

changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D69744911

fbshipit-source-id: 27e24bb8f16ed4dd3f72bb9125332d208f39ad67
This commit is contained in:
Samuel Susla
2025-02-18 05:22:17 -08:00
committed by Facebook GitHub Bot
parent 789ed7d5ad
commit b586f35292
23 changed files with 61 additions and 188 deletions
@@ -292,10 +292,6 @@ class RCTAppDelegateBridgelessFeatureFlags : public ReactNativeFeatureFlagsDefau
{
return true;
}
bool enableFixForViewCommandRace() override
{
return true;
}
};
- (void)_setUpFeatureFlags
@@ -7,7 +7,6 @@
* @flow strict-local
* @format
* @oncall react_native
* @fantom_flags enableFixForViewCommandRace:true
* @fantom_flags enableAccessToHostTreeInFabric:true
*/
@@ -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<<60990f71a42269290b741cd9072d21fe>>
* @generated SignedSource<<6e8144a48ab65f3b5ad8dd601cee2114>>
*/
/**
@@ -82,12 +82,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enableFabricRenderer(): Boolean = accessor.enableFabricRenderer()
/**
* Synchronise the view command dispatching with mounting of new transaction
*/
@JvmStatic
public fun enableFixForViewCommandRace(): Boolean = accessor.enableFixForViewCommandRace()
/**
* iOS Views will clip to their padding box vs border box
*/
@@ -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<<697f62ac96b2b28d64659cd77007a59b>>
* @generated SignedSource<<dd2fa7d4fb722350d77094f8bcc38872>>
*/
/**
@@ -29,7 +29,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableEventEmitterRetentionDuringGesturesOnAndroidCache: Boolean? = null
private var enableFabricLogsCache: Boolean? = null
private var enableFabricRendererCache: Boolean? = null
private var enableFixForViewCommandRaceCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
private var enableImagePrefetchingAndroidCache: Boolean? = null
private var enableJSRuntimeGCOnMemoryPressureOnIOSCache: Boolean? = null
@@ -145,15 +144,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun enableFixForViewCommandRace(): Boolean {
var cached = enableFixForViewCommandRaceCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.enableFixForViewCommandRace()
enableFixForViewCommandRaceCache = cached
}
return cached
}
override fun enableIOSViewClipToPaddingBox(): Boolean {
var cached = enableIOSViewClipToPaddingBoxCache
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<<9e28e6e3e2e7ef27761e3410ea4613a4>>
* @generated SignedSource<<eb52a136ba489460c2131105f4cc5b3f>>
*/
/**
@@ -46,8 +46,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun enableFabricRenderer(): Boolean
@DoNotStrip @JvmStatic public external fun enableFixForViewCommandRace(): Boolean
@DoNotStrip @JvmStatic public external fun enableIOSViewClipToPaddingBox(): Boolean
@DoNotStrip @JvmStatic public external fun enableImagePrefetchingAndroid(): 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<<6db30b8e6ac5778ae5ff333a12c6c17d>>
* @generated SignedSource<<5315bd93234b8c00b7d029081231eeeb>>
*/
/**
@@ -41,8 +41,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun enableFabricRenderer(): Boolean = false
override fun enableFixForViewCommandRace(): Boolean = false
override fun enableIOSViewClipToPaddingBox(): Boolean = false
override fun enableImagePrefetchingAndroid(): 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<<a3e5efb627b5821c18833184e1399303>>
* @generated SignedSource<<a97afc0515bcfc2e4ed60565af08ce8a>>
*/
/**
@@ -33,7 +33,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableEventEmitterRetentionDuringGesturesOnAndroidCache: Boolean? = null
private var enableFabricLogsCache: Boolean? = null
private var enableFabricRendererCache: Boolean? = null
private var enableFixForViewCommandRaceCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
private var enableImagePrefetchingAndroidCache: Boolean? = null
private var enableJSRuntimeGCOnMemoryPressureOnIOSCache: Boolean? = null
@@ -158,16 +157,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun enableFixForViewCommandRace(): Boolean {
var cached = enableFixForViewCommandRaceCache
if (cached == null) {
cached = currentProvider.enableFixForViewCommandRace()
accessedFeatureFlags.add("enableFixForViewCommandRace")
enableFixForViewCommandRaceCache = cached
}
return cached
}
override fun enableIOSViewClipToPaddingBox(): Boolean {
var cached = enableIOSViewClipToPaddingBoxCache
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<<7fb143a0fdf58bc1242ae076cf275037>>
* @generated SignedSource<<51121a77716b7748f993496eff5f6bfb>>
*/
/**
@@ -41,8 +41,6 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun enableFabricRenderer(): Boolean
@DoNotStrip public fun enableFixForViewCommandRace(): Boolean
@DoNotStrip public fun enableIOSViewClipToPaddingBox(): Boolean
@DoNotStrip public fun enableImagePrefetchingAndroid(): 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<<29ba9a9556698e26eac8e2534bce4732>>
* @generated SignedSource<<b0dab4690bff769baf4e83f508a6e514>>
*/
/**
@@ -93,12 +93,6 @@ class ReactNativeFeatureFlagsProviderHolder
return method(javaProvider_);
}
bool enableFixForViewCommandRace() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableFixForViewCommandRace");
return method(javaProvider_);
}
bool enableIOSViewClipToPaddingBox() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableIOSViewClipToPaddingBox");
@@ -346,11 +340,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableFabricRenderer(
return ReactNativeFeatureFlags::enableFabricRenderer();
}
bool JReactNativeFeatureFlagsCxxInterop::enableFixForViewCommandRace(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableFixForViewCommandRace();
}
bool JReactNativeFeatureFlagsCxxInterop::enableIOSViewClipToPaddingBox(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableIOSViewClipToPaddingBox();
@@ -574,9 +563,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableFabricRenderer",
JReactNativeFeatureFlagsCxxInterop::enableFabricRenderer),
makeNativeMethod(
"enableFixForViewCommandRace",
JReactNativeFeatureFlagsCxxInterop::enableFixForViewCommandRace),
makeNativeMethod(
"enableIOSViewClipToPaddingBox",
JReactNativeFeatureFlagsCxxInterop::enableIOSViewClipToPaddingBox),
@@ -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<<a0a26aa89e2156853ae452368b8f0fc8>>
* @generated SignedSource<<0bf1c23eda1c41a60eaae19e87c541e9>>
*/
/**
@@ -57,9 +57,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool enableFabricRenderer(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enableFixForViewCommandRace(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enableIOSViewClipToPaddingBox(
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<<e11bfe475e88d1cc2b1f65174db555dd>>
* @generated SignedSource<<0a3119b99e455127d8a404963a23eb96>>
*/
/**
@@ -62,10 +62,6 @@ bool ReactNativeFeatureFlags::enableFabricRenderer() {
return getAccessor().enableFabricRenderer();
}
bool ReactNativeFeatureFlags::enableFixForViewCommandRace() {
return getAccessor().enableFixForViewCommandRace();
}
bool ReactNativeFeatureFlags::enableIOSViewClipToPaddingBox() {
return getAccessor().enableIOSViewClipToPaddingBox();
}
@@ -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<<7f9d91738a6817bee27c5e0c8ace3686>>
* @generated SignedSource<<b354e1b9ffc58e74ffff200c14728d1d>>
*/
/**
@@ -84,11 +84,6 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enableFabricRenderer();
/**
* Synchronise the view command dispatching with mounting of new transaction
*/
RN_EXPORT static bool enableFixForViewCommandRace();
/**
* iOS Views will clip to their padding box vs border box
*/
@@ -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<<569e1a2d92d988c3695ebeb0d937337c>>
* @generated SignedSource<<41f3b407b98e268ba80f8cd8bb960321>>
*/
/**
@@ -191,24 +191,6 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricRenderer() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::enableFixForViewCommandRace() {
auto flagValue = enableFixForViewCommandRace_.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(9, "enableFixForViewCommandRace");
flagValue = currentProvider_->enableFixForViewCommandRace();
enableFixForViewCommandRace_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::enableIOSViewClipToPaddingBox() {
auto flagValue = enableIOSViewClipToPaddingBox_.load();
@@ -218,7 +200,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(10, "enableIOSViewClipToPaddingBox");
markFlagAsAccessed(9, "enableIOSViewClipToPaddingBox");
flagValue = currentProvider_->enableIOSViewClipToPaddingBox();
enableIOSViewClipToPaddingBox_ = flagValue;
@@ -236,7 +218,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(11, "enableImagePrefetchingAndroid");
markFlagAsAccessed(10, "enableImagePrefetchingAndroid");
flagValue = currentProvider_->enableImagePrefetchingAndroid();
enableImagePrefetchingAndroid_ = flagValue;
@@ -254,7 +236,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(12, "enableJSRuntimeGCOnMemoryPressureOnIOS");
markFlagAsAccessed(11, "enableJSRuntimeGCOnMemoryPressureOnIOS");
flagValue = currentProvider_->enableJSRuntimeGCOnMemoryPressureOnIOS();
enableJSRuntimeGCOnMemoryPressureOnIOS_ = flagValue;
@@ -272,7 +254,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(13, "enableLayoutAnimationsOnAndroid");
markFlagAsAccessed(12, "enableLayoutAnimationsOnAndroid");
flagValue = currentProvider_->enableLayoutAnimationsOnAndroid();
enableLayoutAnimationsOnAndroid_ = flagValue;
@@ -290,7 +272,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(14, "enableLayoutAnimationsOnIOS");
markFlagAsAccessed(13, "enableLayoutAnimationsOnIOS");
flagValue = currentProvider_->enableLayoutAnimationsOnIOS();
enableLayoutAnimationsOnIOS_ = flagValue;
@@ -308,7 +290,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(15, "enableLongTaskAPI");
markFlagAsAccessed(14, "enableLongTaskAPI");
flagValue = currentProvider_->enableLongTaskAPI();
enableLongTaskAPI_ = flagValue;
@@ -326,7 +308,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(16, "enableNativeCSSParsing");
markFlagAsAccessed(15, "enableNativeCSSParsing");
flagValue = currentProvider_->enableNativeCSSParsing();
enableNativeCSSParsing_ = flagValue;
@@ -344,7 +326,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(17, "enableNewBackgroundAndBorderDrawables");
markFlagAsAccessed(16, "enableNewBackgroundAndBorderDrawables");
flagValue = currentProvider_->enableNewBackgroundAndBorderDrawables();
enableNewBackgroundAndBorderDrawables_ = flagValue;
@@ -362,7 +344,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(18, "enablePreciseSchedulingForPremountItemsOnAndroid");
markFlagAsAccessed(17, "enablePreciseSchedulingForPremountItemsOnAndroid");
flagValue = currentProvider_->enablePreciseSchedulingForPremountItemsOnAndroid();
enablePreciseSchedulingForPremountItemsOnAndroid_ = flagValue;
@@ -380,7 +362,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(19, "enablePropsUpdateReconciliationAndroid");
markFlagAsAccessed(18, "enablePropsUpdateReconciliationAndroid");
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
enablePropsUpdateReconciliationAndroid_ = flagValue;
@@ -398,7 +380,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(20, "enableReportEventPaintTime");
markFlagAsAccessed(19, "enableReportEventPaintTime");
flagValue = currentProvider_->enableReportEventPaintTime();
enableReportEventPaintTime_ = flagValue;
@@ -416,7 +398,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(21, "enableSynchronousStateUpdates");
markFlagAsAccessed(20, "enableSynchronousStateUpdates");
flagValue = currentProvider_->enableSynchronousStateUpdates();
enableSynchronousStateUpdates_ = flagValue;
@@ -434,7 +416,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(22, "enableUIConsistency");
markFlagAsAccessed(21, "enableUIConsistency");
flagValue = currentProvider_->enableUIConsistency();
enableUIConsistency_ = flagValue;
@@ -452,7 +434,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(23, "enableViewCulling");
markFlagAsAccessed(22, "enableViewCulling");
flagValue = currentProvider_->enableViewCulling();
enableViewCulling_ = 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::enableViewRecyclingForText() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(25, "enableViewRecyclingForText");
markFlagAsAccessed(24, "enableViewRecyclingForText");
flagValue = currentProvider_->enableViewRecyclingForText();
enableViewRecyclingForText_ = flagValue;
@@ -506,7 +488,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(26, "enableViewRecyclingForView");
markFlagAsAccessed(25, "enableViewRecyclingForView");
flagValue = currentProvider_->enableViewRecyclingForView();
enableViewRecyclingForView_ = flagValue;
@@ -524,7 +506,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(27, "excludeYogaFromRawProps");
markFlagAsAccessed(26, "excludeYogaFromRawProps");
flagValue = currentProvider_->excludeYogaFromRawProps();
excludeYogaFromRawProps_ = flagValue;
@@ -542,7 +524,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(28, "fixDifferentiatorEmittingUpdatesWithWrongParentTag");
markFlagAsAccessed(27, "fixDifferentiatorEmittingUpdatesWithWrongParentTag");
flagValue = currentProvider_->fixDifferentiatorEmittingUpdatesWithWrongParentTag();
fixDifferentiatorEmittingUpdatesWithWrongParentTag_ = flagValue;
@@ -560,7 +542,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(29, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
markFlagAsAccessed(28, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
@@ -578,7 +560,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(30, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid");
markFlagAsAccessed(29, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid");
flagValue = currentProvider_->fixMountingCoordinatorReportedPendingTransactionsOnAndroid();
fixMountingCoordinatorReportedPendingTransactionsOnAndroid_ = flagValue;
@@ -596,7 +578,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(31, "fuseboxEnabledRelease");
markFlagAsAccessed(30, "fuseboxEnabledRelease");
flagValue = currentProvider_->fuseboxEnabledRelease();
fuseboxEnabledRelease_ = flagValue;
@@ -614,7 +596,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(32, "fuseboxNetworkInspectionEnabled");
markFlagAsAccessed(31, "fuseboxNetworkInspectionEnabled");
flagValue = currentProvider_->fuseboxNetworkInspectionEnabled();
fuseboxNetworkInspectionEnabled_ = flagValue;
@@ -632,7 +614,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(33, "lazyAnimationCallbacks");
markFlagAsAccessed(32, "lazyAnimationCallbacks");
flagValue = currentProvider_->lazyAnimationCallbacks();
lazyAnimationCallbacks_ = flagValue;
@@ -650,7 +632,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(34, "traceTurboModulePromiseRejectionsOnAndroid");
markFlagAsAccessed(33, "traceTurboModulePromiseRejectionsOnAndroid");
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
@@ -668,7 +650,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(35, "useAlwaysAvailableJSErrorHandling");
markFlagAsAccessed(34, "useAlwaysAvailableJSErrorHandling");
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
useAlwaysAvailableJSErrorHandling_ = flagValue;
@@ -686,7 +668,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(36, "useEditTextStockAndroidFocusBehavior");
markFlagAsAccessed(35, "useEditTextStockAndroidFocusBehavior");
flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior();
useEditTextStockAndroidFocusBehavior_ = flagValue;
@@ -704,7 +686,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(37, "useFabricInterop");
markFlagAsAccessed(36, "useFabricInterop");
flagValue = currentProvider_->useFabricInterop();
useFabricInterop_ = flagValue;
@@ -722,7 +704,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(37, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -740,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(39, "useOptimizedEventBatchingOnAndroid");
markFlagAsAccessed(38, "useOptimizedEventBatchingOnAndroid");
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
useOptimizedEventBatchingOnAndroid_ = flagValue;
@@ -758,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(40, "useRawPropsJsiValue");
markFlagAsAccessed(39, "useRawPropsJsiValue");
flagValue = currentProvider_->useRawPropsJsiValue();
useRawPropsJsiValue_ = flagValue;
@@ -776,7 +758,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(41, "useTurboModuleInterop");
markFlagAsAccessed(40, "useTurboModuleInterop");
flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
@@ -794,7 +776,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(42, "useTurboModules");
markFlagAsAccessed(41, "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<<faf54ae7c4ef9bc2dcad119f70581754>>
* @generated SignedSource<<cf03a6e938df9988c00249dc78576cbf>>
*/
/**
@@ -41,7 +41,6 @@ class ReactNativeFeatureFlagsAccessor {
bool enableEventEmitterRetentionDuringGesturesOnAndroid();
bool enableFabricLogs();
bool enableFabricRenderer();
bool enableFixForViewCommandRace();
bool enableIOSViewClipToPaddingBox();
bool enableImagePrefetchingAndroid();
bool enableJSRuntimeGCOnMemoryPressureOnIOS();
@@ -86,7 +85,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 43> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 42> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
@@ -97,7 +96,6 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> enableEventEmitterRetentionDuringGesturesOnAndroid_;
std::atomic<std::optional<bool>> enableFabricLogs_;
std::atomic<std::optional<bool>> enableFabricRenderer_;
std::atomic<std::optional<bool>> enableFixForViewCommandRace_;
std::atomic<std::optional<bool>> enableIOSViewClipToPaddingBox_;
std::atomic<std::optional<bool>> enableImagePrefetchingAndroid_;
std::atomic<std::optional<bool>> enableJSRuntimeGCOnMemoryPressureOnIOS_;
@@ -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<<c6a8b105e4657ef398ab9dd548ebeff0>>
* @generated SignedSource<<1ade51e6e5c82275c5c01b72df630eee>>
*/
/**
@@ -63,10 +63,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool enableFixForViewCommandRace() override {
return false;
}
bool enableIOSViewClipToPaddingBox() 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<<ef09e15c51a69db7d3c66fd5f096314e>>
* @generated SignedSource<<95aa462c1a48b2299c2a82adf74c58df>>
*/
/**
@@ -126,15 +126,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::enableFabricRenderer();
}
bool enableFixForViewCommandRace() override {
auto value = values_["enableFixForViewCommandRace"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::enableFixForViewCommandRace();
}
bool enableIOSViewClipToPaddingBox() override {
auto value = values_["enableIOSViewClipToPaddingBox"];
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<<b40ca96bcb72e91578320384e6d26401>>
* @generated SignedSource<<f3241de0ced5e6ea54e6debf2a453c36>>
*/
/**
@@ -34,7 +34,6 @@ class ReactNativeFeatureFlagsProvider {
virtual bool enableEventEmitterRetentionDuringGesturesOnAndroid() = 0;
virtual bool enableFabricLogs() = 0;
virtual bool enableFabricRenderer() = 0;
virtual bool enableFixForViewCommandRace() = 0;
virtual bool enableIOSViewClipToPaddingBox() = 0;
virtual bool enableImagePrefetchingAndroid() = 0;
virtual bool enableJSRuntimeGCOnMemoryPressureOnIOS() = 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<<4f565477e7fd49756af7e8ac548c09a2>>
* @generated SignedSource<<9a4f0e72b7e6518347f65253c018220a>>
*/
/**
@@ -89,11 +89,6 @@ bool NativeReactNativeFeatureFlags::enableFabricRenderer(
return ReactNativeFeatureFlags::enableFabricRenderer();
}
bool NativeReactNativeFeatureFlags::enableFixForViewCommandRace(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::enableFixForViewCommandRace();
}
bool NativeReactNativeFeatureFlags::enableIOSViewClipToPaddingBox(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::enableIOSViewClipToPaddingBox();
@@ -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<<9f27af3cebde0b0befb40a5bda2c2f0e>>
* @generated SignedSource<<16deece14930c9b259f6f7594127fe55>>
*/
/**
@@ -55,8 +55,6 @@ class NativeReactNativeFeatureFlags
bool enableFabricRenderer(jsi::Runtime& runtime);
bool enableFixForViewCommandRace(jsi::Runtime& runtime);
bool enableIOSViewClipToPaddingBox(jsi::Runtime& runtime);
bool enableImagePrefetchingAndroid(jsi::Runtime& runtime);
@@ -285,19 +285,14 @@ void Scheduler::uiManagerDidDispatchCommand(
if (delegate_ != nullptr) {
auto shadowView = ShadowView(*shadowNode);
if (ReactNativeFeatureFlags::enableFixForViewCommandRace()) {
runtimeScheduler_->scheduleRenderingUpdate(
shadowNode->getSurfaceId(),
[delegate = delegate_,
shadowView = std::move(shadowView),
commandName,
args]() {
delegate->schedulerDidDispatchCommand(
shadowView, commandName, args);
});
} else {
delegate_->schedulerDidDispatchCommand(shadowView, commandName, args);
}
runtimeScheduler_->scheduleRenderingUpdate(
shadowNode->getSurfaceId(),
[delegate = delegate_,
shadowView = std::move(shadowView),
commandName,
args]() {
delegate->schedulerDidDispatchCommand(shadowView, commandName, args);
});
}
}
@@ -143,17 +143,6 @@ const definitions: FeatureFlagDefinitions = {
},
ossReleaseStage: 'canary',
},
enableFixForViewCommandRace: {
defaultValue: false,
metadata: {
dateAdded: '2024-11-14',
description:
'Synchronise the view command dispatching with mounting of new transaction',
expectedReleaseValue: true,
purpose: 'experimentation',
},
ossReleaseStage: 'none',
},
enableIOSViewClipToPaddingBox: {
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<<4c34b78c4af6de8e0784ecade5f2e593>>
* @generated SignedSource<<4bdedb6bbe2199cb99e72e86bfffe372>>
* @flow strict
*/
@@ -58,7 +58,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean>,
enableFabricLogs: Getter<boolean>,
enableFabricRenderer: Getter<boolean>,
enableFixForViewCommandRace: Getter<boolean>,
enableIOSViewClipToPaddingBox: Getter<boolean>,
enableImagePrefetchingAndroid: Getter<boolean>,
enableJSRuntimeGCOnMemoryPressureOnIOS: Getter<boolean>,
@@ -209,10 +208,6 @@ export const enableFabricLogs: Getter<boolean> = createNativeFlagGetter('enableF
* Enables the use of the Fabric renderer in the whole app.
*/
export const enableFabricRenderer: Getter<boolean> = createNativeFlagGetter('enableFabricRenderer', false);
/**
* Synchronise the view command dispatching with mounting of new transaction
*/
export const enableFixForViewCommandRace: Getter<boolean> = createNativeFlagGetter('enableFixForViewCommandRace', false);
/**
* iOS Views will clip to their padding box vs border box
*/
@@ -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<<698e092ea2501b8d0c907f3b7085da3b>>
* @generated SignedSource<<06a03507366a38dfc43868e94d75fcf1>>
* @flow strict
*/
@@ -33,7 +33,6 @@ export interface Spec extends TurboModule {
+enableEventEmitterRetentionDuringGesturesOnAndroid?: () => boolean;
+enableFabricLogs?: () => boolean;
+enableFabricRenderer?: () => boolean;
+enableFixForViewCommandRace?: () => boolean;
+enableIOSViewClipToPaddingBox?: () => boolean;
+enableImagePrefetchingAndroid?: () => boolean;
+enableJSRuntimeGCOnMemoryPressureOnIOS?: () => boolean;