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