From 3e73dfb535570ffd38eefd84404a7009d89d4800 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 9 Apr 2024 07:59:00 -0700 Subject: [PATCH] remove enableFixForClippedSubviewsCrash experiment (#43963) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43963 changelog: [internal] This experiment did work out. Let's clean it up Reviewed By: cortinico Differential Revision: D55797519 fbshipit-source-id: a5da97a7d31b9395b25bfd37db567054721599b0 --- .../mounting/SurfaceMountingManager.java | 23 +---------- .../featureflags/ReactNativeFeatureFlags.kt | 8 +--- .../ReactNativeFeatureFlagsCxxAccessor.kt | 12 +----- .../ReactNativeFeatureFlagsCxxInterop.kt | 4 +- .../ReactNativeFeatureFlagsDefaults.kt | 4 +- .../ReactNativeFeatureFlagsLocalAccessor.kt | 13 +------ .../ReactNativeFeatureFlagsProvider.kt | 4 +- .../react/views/view/ReactViewGroup.java | 4 +- .../JReactNativeFeatureFlagsCxxInterop.cpp | 16 +------- .../JReactNativeFeatureFlagsCxxInterop.h | 5 +-- .../featureflags/ReactNativeFeatureFlags.cpp | 6 +-- .../featureflags/ReactNativeFeatureFlags.h | 7 +--- .../ReactNativeFeatureFlagsAccessor.cpp | 38 +++++-------------- .../ReactNativeFeatureFlagsAccessor.h | 6 +-- .../ReactNativeFeatureFlagsDefaults.h | 6 +-- .../ReactNativeFeatureFlagsProvider.h | 3 +- .../NativeReactNativeFeatureFlags.cpp | 7 +--- .../NativeReactNativeFeatureFlags.h | 4 +- .../ReactNativeFeatureFlags.config.js | 5 --- .../featureflags/ReactNativeFeatureFlags.js | 7 +--- .../specs/NativeReactNativeFeatureFlags.js | 3 +- 21 files changed, 31 insertions(+), 154 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java index 199545f6a39706..dc7179653fe8f4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java @@ -35,7 +35,6 @@ import com.facebook.react.fabric.events.EventEmitterWrapper; import com.facebook.react.fabric.mounting.MountingManager.MountItemExecutor; import com.facebook.react.fabric.mounting.mountitems.MountItem; -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags; import com.facebook.react.modules.core.ReactChoreographer; import com.facebook.react.touch.JSResponderHandler; import com.facebook.react.uimanager.IViewGroupManager; @@ -50,7 +49,6 @@ import com.facebook.react.uimanager.ViewManager; import com.facebook.react.uimanager.ViewManagerRegistry; import com.facebook.react.uimanager.events.EventCategoryDef; -import com.facebook.react.views.view.ReactViewGroup; import java.util.ArrayDeque; import java.util.HashSet; import java.util.LinkedList; @@ -384,25 +382,8 @@ public void addViewAt(final int parentTag, final int tag, final int index) { // should be impossible - we mark this as a "readded" View and // thus prevent the RemoveDeleteTree worker from deleting this // View in the future. - if (ReactNativeFeatureFlags.enableFixForClippedSubviewsCrash()) { - if (viewParent instanceof ReactViewGroup) { - ReactViewGroup viewParentGroup = (ReactViewGroup) viewParent; - // If the parent group has subview clipping enabled, we need to use the specialized - // method. - // Otherwise, ReactViewGroup's member variables managing subview clipping - // will get out of sync with Android's view hierarchy, leading to a crash. - if (viewParentGroup.getRemoveClippedSubviews()) { - viewParentGroup.removeViewWithSubviewClippingEnabled(view); - } else { - viewParentGroup.removeView(view); - } - } else if (viewParent instanceof ViewGroup) { - ((ViewGroup) viewParent).removeView(view); - } - } else { - if (viewParent instanceof ViewGroup) { - ((ViewGroup) viewParent).removeView(view); - } + if (viewParent instanceof ViewGroup) { + ((ViewGroup) viewParent).removeView(view); } mErroneouslyReaddedReactTags.add(tag); } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index d5f9f7ad42fc01..b6450cb4bca02f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<4c0ede4fa927bc8361d0355bc7cddb10>> */ /** @@ -58,12 +58,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun enableCustomDrawOrderFabric(): Boolean = accessor.enableCustomDrawOrderFabric() - /** - * Attempt at fixing a crash related to subview clipping on Android. This is a kill switch for the fix - */ - @JvmStatic - public fun enableFixForClippedSubviewsCrash(): Boolean = accessor.enableFixForClippedSubviewsCrash() - /** * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution). */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index 0b2dee9658517a..ad1b4bd50d6993 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<99c459dce42767a7da84810fbceea73e>> + * @generated SignedSource<> */ /** @@ -25,7 +25,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso private var enableBackgroundExecutorCache: Boolean? = null private var enableCleanTextInputYogaNodeCache: Boolean? = null private var enableCustomDrawOrderFabricCache: Boolean? = null - private var enableFixForClippedSubviewsCrashCache: Boolean? = null private var enableMicrotasksCache: Boolean? = null private var enableMountHooksAndroidCache: Boolean? = null private var enableSpannableBuildingUnificationCache: Boolean? = null @@ -81,15 +80,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso return cached } - override fun enableFixForClippedSubviewsCrash(): Boolean { - var cached = enableFixForClippedSubviewsCrashCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.enableFixForClippedSubviewsCrash() - enableFixForClippedSubviewsCrashCache = cached - } - return cached - } - override fun enableMicrotasks(): Boolean { var cached = enableMicrotasksCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index 0cbb8b042aef64..75af0124187dac 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<69c4a4aa9621adfe02c15f5f011b3804>> */ /** @@ -38,8 +38,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun enableCustomDrawOrderFabric(): Boolean - @DoNotStrip @JvmStatic public external fun enableFixForClippedSubviewsCrash(): Boolean - @DoNotStrip @JvmStatic public external fun enableMicrotasks(): Boolean @DoNotStrip @JvmStatic public external fun enableMountHooksAndroid(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index 333af4922446c0..324eac6805e54e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<299901489d5059ed7124f6738be0e48d>> */ /** @@ -33,8 +33,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun enableCustomDrawOrderFabric(): Boolean = false - override fun enableFixForClippedSubviewsCrash(): Boolean = false - override fun enableMicrotasks(): Boolean = false override fun enableMountHooksAndroid(): Boolean = false diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index e2d021b90be319..fda593afdcf015 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<1c5e5d965ec746a3d06748ef922b8460>> */ /** @@ -29,7 +29,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces private var enableBackgroundExecutorCache: Boolean? = null private var enableCleanTextInputYogaNodeCache: Boolean? = null private var enableCustomDrawOrderFabricCache: Boolean? = null - private var enableFixForClippedSubviewsCrashCache: Boolean? = null private var enableMicrotasksCache: Boolean? = null private var enableMountHooksAndroidCache: Boolean? = null private var enableSpannableBuildingUnificationCache: Boolean? = null @@ -90,16 +89,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun enableFixForClippedSubviewsCrash(): Boolean { - var cached = enableFixForClippedSubviewsCrashCache - if (cached == null) { - cached = currentProvider.enableFixForClippedSubviewsCrash() - accessedFeatureFlags.add("enableFixForClippedSubviewsCrash") - enableFixForClippedSubviewsCrashCache = cached - } - return cached - } - override fun enableMicrotasks(): Boolean { var cached = enableMicrotasksCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index f4ec23b29d276f..14f3eeb4cffaa8 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<51dd25e88ebf2ac9929c477e710d3d8d>> + * @generated SignedSource<<2412f7c99bf424397e091a529ac05f32>> */ /** @@ -33,8 +33,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun enableCustomDrawOrderFabric(): Boolean - @DoNotStrip public fun enableFixForClippedSubviewsCrash(): Boolean - @DoNotStrip public fun enableMicrotasks(): Boolean @DoNotStrip public fun enableMountHooksAndroid(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java index c24a5b359192bc..7426dfb4518e87 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java @@ -692,9 +692,7 @@ public void run() { } } - // TODO: make this method package only once we remove Android's mounting layer retry mechanism. - @VisibleForTesting - public void removeViewWithSubviewClippingEnabled(View view) { + /*package*/ void removeViewWithSubviewClippingEnabled(View view) { UiThreadUtil.assertOnUiThread(); Assertions.assertCondition(mRemoveClippedSubviews); diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index 52e85349948ac8..f22e68be74e9ac 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<0756d56ae2ce45f020ac9a87e9a3d1c3>> */ /** @@ -69,12 +69,6 @@ class ReactNativeFeatureFlagsProviderHolder return method(javaProvider_); } - bool enableFixForClippedSubviewsCrash() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enableFixForClippedSubviewsCrash"); - return method(javaProvider_); - } - bool enableMicrotasks() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enableMicrotasks"); @@ -158,11 +152,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableCustomDrawOrderFabric( return ReactNativeFeatureFlags::enableCustomDrawOrderFabric(); } -bool JReactNativeFeatureFlagsCxxInterop::enableFixForClippedSubviewsCrash( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::enableFixForClippedSubviewsCrash(); -} - bool JReactNativeFeatureFlagsCxxInterop::enableMicrotasks( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::enableMicrotasks(); @@ -240,9 +229,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "enableCustomDrawOrderFabric", JReactNativeFeatureFlagsCxxInterop::enableCustomDrawOrderFabric), - makeNativeMethod( - "enableFixForClippedSubviewsCrash", - JReactNativeFeatureFlagsCxxInterop::enableFixForClippedSubviewsCrash), makeNativeMethod( "enableMicrotasks", JReactNativeFeatureFlagsCxxInterop::enableMicrotasks), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index 45964a13648bce..b1ff803c287ec8 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<1ae5c51e5b1c1725565e57a02d19c3a7>> */ /** @@ -45,9 +45,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool enableCustomDrawOrderFabric( facebook::jni::alias_ref); - static bool enableFixForClippedSubviewsCrash( - facebook::jni::alias_ref); - static bool enableMicrotasks( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index d948fc353458aa..fbedd28aff4acb 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<520ae882fb57dec58ededd47411c0b1d>> */ /** @@ -41,10 +41,6 @@ bool ReactNativeFeatureFlags::enableCustomDrawOrderFabric() { return getAccessor().enableCustomDrawOrderFabric(); } -bool ReactNativeFeatureFlags::enableFixForClippedSubviewsCrash() { - return getAccessor().enableFixForClippedSubviewsCrash(); -} - bool ReactNativeFeatureFlags::enableMicrotasks() { return getAccessor().enableMicrotasks(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 84561bb855ded2..9c58e99111d076 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<881b149aca14f4f73e45e02089787a88>> + * @generated SignedSource<> */ /** @@ -62,11 +62,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool enableCustomDrawOrderFabric(); - /** - * Attempt at fixing a crash related to subview clipping on Android. This is a kill switch for the fix - */ - RN_EXPORT static bool enableFixForClippedSubviewsCrash(); - /** * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution). */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 1faf1ee7bcab59..afeaa359a71bcb 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<65cbd0e1b92ee06da3f466386c516dbc>> */ /** @@ -119,24 +119,6 @@ bool ReactNativeFeatureFlagsAccessor::enableCustomDrawOrderFabric() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::enableFixForClippedSubviewsCrash() { - auto flagValue = enableFixForClippedSubviewsCrash_.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(5, "enableFixForClippedSubviewsCrash"); - - flagValue = currentProvider_->enableFixForClippedSubviewsCrash(); - enableFixForClippedSubviewsCrash_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::enableMicrotasks() { auto flagValue = enableMicrotasks_.load(); @@ -146,7 +128,7 @@ bool ReactNativeFeatureFlagsAccessor::enableMicrotasks() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(6, "enableMicrotasks"); + markFlagAsAccessed(5, "enableMicrotasks"); flagValue = currentProvider_->enableMicrotasks(); enableMicrotasks_ = flagValue; @@ -164,7 +146,7 @@ bool ReactNativeFeatureFlagsAccessor::enableMountHooksAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(7, "enableMountHooksAndroid"); + markFlagAsAccessed(6, "enableMountHooksAndroid"); flagValue = currentProvider_->enableMountHooksAndroid(); enableMountHooksAndroid_ = flagValue; @@ -182,7 +164,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSpannableBuildingUnification() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(8, "enableSpannableBuildingUnification"); + markFlagAsAccessed(7, "enableSpannableBuildingUnification"); flagValue = currentProvider_->enableSpannableBuildingUnification(); enableSpannableBuildingUnification_ = flagValue; @@ -200,7 +182,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(9, "enableSynchronousStateUpdates"); + markFlagAsAccessed(8, "enableSynchronousStateUpdates"); flagValue = currentProvider_->enableSynchronousStateUpdates(); enableSynchronousStateUpdates_ = flagValue; @@ -218,7 +200,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(10, "enableUIConsistency"); + markFlagAsAccessed(9, "enableUIConsistency"); flagValue = currentProvider_->enableUIConsistency(); enableUIConsistency_ = flagValue; @@ -236,7 +218,7 @@ bool ReactNativeFeatureFlagsAccessor::inspectorEnableCxxInspectorPackagerConnect // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(11, "inspectorEnableCxxInspectorPackagerConnection"); + markFlagAsAccessed(10, "inspectorEnableCxxInspectorPackagerConnection"); flagValue = currentProvider_->inspectorEnableCxxInspectorPackagerConnection(); inspectorEnableCxxInspectorPackagerConnection_ = flagValue; @@ -254,7 +236,7 @@ bool ReactNativeFeatureFlagsAccessor::inspectorEnableModernCDPRegistry() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(12, "inspectorEnableModernCDPRegistry"); + markFlagAsAccessed(11, "inspectorEnableModernCDPRegistry"); flagValue = currentProvider_->inspectorEnableModernCDPRegistry(); inspectorEnableModernCDPRegistry_ = flagValue; @@ -272,7 +254,7 @@ bool ReactNativeFeatureFlagsAccessor::useModernRuntimeScheduler() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(13, "useModernRuntimeScheduler"); + markFlagAsAccessed(12, "useModernRuntimeScheduler"); flagValue = currentProvider_->useModernRuntimeScheduler(); useModernRuntimeScheduler_ = flagValue; @@ -290,7 +272,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(14, "useNativeViewConfigsInBridgelessMode"); + markFlagAsAccessed(13, "useNativeViewConfigsInBridgelessMode"); flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); useNativeViewConfigsInBridgelessMode_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index f24364ae184b7d..3736fdc54f6c7c 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<48b454c264577c4e85eb6b9b46d5d2c5>> + * @generated SignedSource<<00e1c8f5c451c9744257e0b3fc566949>> */ /** @@ -36,7 +36,6 @@ class ReactNativeFeatureFlagsAccessor { bool enableBackgroundExecutor(); bool enableCleanTextInputYogaNode(); bool enableCustomDrawOrderFabric(); - bool enableFixForClippedSubviewsCrash(); bool enableMicrotasks(); bool enableMountHooksAndroid(); bool enableSpannableBuildingUnification(); @@ -56,14 +55,13 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 15> accessedFeatureFlags_; + std::array, 14> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> batchRenderingUpdatesInEventLoop_; std::atomic> enableBackgroundExecutor_; std::atomic> enableCleanTextInputYogaNode_; std::atomic> enableCustomDrawOrderFabric_; - std::atomic> enableFixForClippedSubviewsCrash_; std::atomic> enableMicrotasks_; std::atomic> enableMountHooksAndroid_; std::atomic> enableSpannableBuildingUnification_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 904ff75fa026a2..c8feb9416c8d1e 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<6b07d06ca1f100cca35e2b8b108f1993>> + * @generated SignedSource<<57c83d1855f16d4c3ffdd5cb98d57571>> */ /** @@ -47,10 +47,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool enableFixForClippedSubviewsCrash() override { - return false; - } - bool enableMicrotasks() override { return false; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 4f8f7b9350ba82..72aee0dd8a6fc6 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<633090e21068e67cff5aa9b0d4f9e323>> + * @generated SignedSource<<664351a329e558acf1923baeafe35e9d>> */ /** @@ -30,7 +30,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool enableBackgroundExecutor() = 0; virtual bool enableCleanTextInputYogaNode() = 0; virtual bool enableCustomDrawOrderFabric() = 0; - virtual bool enableFixForClippedSubviewsCrash() = 0; virtual bool enableMicrotasks() = 0; virtual bool enableMountHooksAndroid() = 0; virtual bool enableSpannableBuildingUnification() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index 5987d51c3a18f3..369d188b50fb06 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<8b20f7b7385c91e54cd385d6af54691b>> + * @generated SignedSource<<8c7e1d8afe1bc2068c94148a258c2ed0>> */ /** @@ -62,11 +62,6 @@ bool NativeReactNativeFeatureFlags::enableCustomDrawOrderFabric( return ReactNativeFeatureFlags::enableCustomDrawOrderFabric(); } -bool NativeReactNativeFeatureFlags::enableFixForClippedSubviewsCrash( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::enableFixForClippedSubviewsCrash(); -} - bool NativeReactNativeFeatureFlags::enableMicrotasks( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::enableMicrotasks(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 2666f2a0600fc2..7682e88d53b632 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<0dcfc928ff0eca1cb37766170d9b4379>> + * @generated SignedSource<<9d8d8fd8a9da981fd35c9f134f575e57>> */ /** @@ -45,8 +45,6 @@ class NativeReactNativeFeatureFlags bool enableCustomDrawOrderFabric(jsi::Runtime& runtime); - bool enableFixForClippedSubviewsCrash(jsi::Runtime& runtime); - bool enableMicrotasks(jsi::Runtime& runtime); bool enableMountHooksAndroid(jsi::Runtime& runtime); diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 94358314efb8a6..c4c4f378b39846 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -51,11 +51,6 @@ const definitions: FeatureFlagDefinitions = { description: 'When enabled, Fabric will use customDrawOrder in ReactViewGroup (similar to old architecture).', }, - enableFixForClippedSubviewsCrash: { - defaultValue: false, - description: - 'Attempt at fixing a crash related to subview clipping on Android. This is a kill switch for the fix', - }, enableMicrotasks: { defaultValue: false, description: diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index d5d2323a20d484..caf5af53932603 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<9286e5fc6398d839d271af4f4a8ae94b>> * @flow strict-local */ @@ -45,7 +45,6 @@ export type ReactNativeFeatureFlags = { enableBackgroundExecutor: Getter, enableCleanTextInputYogaNode: Getter, enableCustomDrawOrderFabric: Getter, - enableFixForClippedSubviewsCrash: Getter, enableMicrotasks: Getter, enableMountHooksAndroid: Getter, enableSpannableBuildingUnification: Getter, @@ -117,10 +116,6 @@ export const enableCleanTextInputYogaNode: Getter = createNativeFlagGet * When enabled, Fabric will use customDrawOrder in ReactViewGroup (similar to old architecture). */ export const enableCustomDrawOrderFabric: Getter = createNativeFlagGetter('enableCustomDrawOrderFabric', false); -/** - * Attempt at fixing a crash related to subview clipping on Android. This is a kill switch for the fix - */ -export const enableFixForClippedSubviewsCrash: Getter = createNativeFlagGetter('enableFixForClippedSubviewsCrash', false); /** * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution). */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index af5f017effc258..c38ed3a21feba0 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<9e0489da8f2a77565018ee983f7fae7e>> + * @generated SignedSource<> * @flow strict-local */ @@ -28,7 +28,6 @@ export interface Spec extends TurboModule { +enableBackgroundExecutor?: () => boolean; +enableCleanTextInputYogaNode?: () => boolean; +enableCustomDrawOrderFabric?: () => boolean; - +enableFixForClippedSubviewsCrash?: () => boolean; +enableMicrotasks?: () => boolean; +enableMountHooksAndroid?: () => boolean; +enableSpannableBuildingUnification?: () => boolean;