diff --git a/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm b/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm index 9de23e72cb8..c1cc9d7d22f 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm @@ -15,6 +15,7 @@ #import #import #import +#import #import #import #import 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 7d36eef1511..0143fbb9a93 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<<9406085adbc0685b473c868a27085cf8>> + * @generated SignedSource<<6f0aac1f6451f4dcd6290116c925f7c4>> */ /** @@ -504,12 +504,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun useNativeViewConfigsInBridgelessMode(): Boolean = accessor.useNativeViewConfigsInBridgelessMode() - /** - * Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value - */ - @JvmStatic - public fun useRawPropsJsiValue(): Boolean = accessor.useRawPropsJsiValue() - /** * Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family. */ 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 90e5cb3f024..c56e80d350c 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<> */ /** @@ -99,7 +99,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null private var useFabricInteropCache: Boolean? = null private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null - private var useRawPropsJsiValueCache: Boolean? = null private var useShadowNodeStateOnCloneCache: Boolean? = null private var useSharedAnimatedBackendCache: Boolean? = null private var useTraitHiddenOnAndroidCache: Boolean? = null @@ -820,15 +819,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun useRawPropsJsiValue(): Boolean { - var cached = useRawPropsJsiValueCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.useRawPropsJsiValue() - useRawPropsJsiValueCache = cached - } - return cached - } - override fun useShadowNodeStateOnClone(): Boolean { var cached = useShadowNodeStateOnCloneCache 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 f73c0a52d7b..1579785999e 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<<285349293c92ae2588664ae854fa250a>> */ /** @@ -186,8 +186,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean - @DoNotStrip @JvmStatic public external fun useRawPropsJsiValue(): Boolean - @DoNotStrip @JvmStatic public external fun useShadowNodeStateOnClone(): Boolean @DoNotStrip @JvmStatic public external fun useSharedAnimatedBackend(): 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 d1174d7c70c..387e3581cc0 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<<6bdc23594dd175a0bf4409c0e2f10552>> + * @generated SignedSource<<24678f43c0deb08304bc86bbef617eb8>> */ /** @@ -181,8 +181,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun useNativeViewConfigsInBridgelessMode(): Boolean = false - override fun useRawPropsJsiValue(): Boolean = true - override fun useShadowNodeStateOnClone(): Boolean = true override fun useSharedAnimatedBackend(): 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 e32df1946ea..b502c959569 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<<3b0c2dec02a603afec82993302ecb6ff>> + * @generated SignedSource<> */ /** @@ -103,7 +103,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null private var useFabricInteropCache: Boolean? = null private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null - private var useRawPropsJsiValueCache: Boolean? = null private var useShadowNodeStateOnCloneCache: Boolean? = null private var useSharedAnimatedBackendCache: Boolean? = null private var useTraitHiddenOnAndroidCache: Boolean? = null @@ -903,16 +902,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } - override fun useRawPropsJsiValue(): Boolean { - var cached = useRawPropsJsiValueCache - if (cached == null) { - cached = currentProvider.useRawPropsJsiValue() - accessedFeatureFlags.add("useRawPropsJsiValue") - useRawPropsJsiValueCache = cached - } - return cached - } - override fun useShadowNodeStateOnClone(): Boolean { var cached = useShadowNodeStateOnCloneCache 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 cf35ff452ee..b96ef23f60b 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<<995c1c3035757935dc7a4c4d6778e43e>> + * @generated SignedSource<<26c5b5fc23fdce860c39d37c6edfeb4d>> */ /** @@ -181,8 +181,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean - @DoNotStrip public fun useRawPropsJsiValue(): Boolean - @DoNotStrip public fun useShadowNodeStateOnClone(): Boolean @DoNotStrip public fun useSharedAnimatedBackend(): Boolean 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 cb542fe05cd..8b1da518e3d 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<<1ea556a16d18a54b7087742b986a93a7>> + * @generated SignedSource<<832afeff38c393fde762b0e33fcd802e>> */ /** @@ -513,12 +513,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool useRawPropsJsiValue() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useRawPropsJsiValue"); - return method(javaProvider_); - } - bool useShadowNodeStateOnClone() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useShadowNodeStateOnClone"); @@ -966,11 +960,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode( return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode(); } -bool JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::useRawPropsJsiValue(); -} - bool JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::useShadowNodeStateOnClone(); @@ -1279,9 +1268,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "useNativeViewConfigsInBridgelessMode", JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode), - makeNativeMethod( - "useRawPropsJsiValue", - JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue), makeNativeMethod( "useShadowNodeStateOnClone", JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone), 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 9d9178985b5..55c631a87e9 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<<67b23d4209c5fa6b721921953d76a829>> + * @generated SignedSource<<78530405942f4d922c6442e0c274e26f>> */ /** @@ -267,9 +267,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool useNativeViewConfigsInBridgelessMode( facebook::jni::alias_ref); - static bool useRawPropsJsiValue( - facebook::jni::alias_ref); - static bool useShadowNodeStateOnClone( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactApple/RCTAnimatedModuleProvider/RCTAnimatedModuleProvider.mm b/packages/react-native/ReactApple/RCTAnimatedModuleProvider/RCTAnimatedModuleProvider.mm index 61b63226e3e..14627a2865e 100644 --- a/packages/react-native/ReactApple/RCTAnimatedModuleProvider/RCTAnimatedModuleProvider.mm +++ b/packages/react-native/ReactApple/RCTAnimatedModuleProvider/RCTAnimatedModuleProvider.mm @@ -14,6 +14,8 @@ #else #import #endif + +#import #import #import diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index 5a382dd0a39..bb4c43b55fd 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<<3d71ee2b906dcc1313428185cbe853f8>> + * @generated SignedSource<<5ad716b4ded11ac4131aa52b378615d9>> */ /** @@ -342,10 +342,6 @@ bool ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode() { return getAccessor().useNativeViewConfigsInBridgelessMode(); } -bool ReactNativeFeatureFlags::useRawPropsJsiValue() { - return getAccessor().useRawPropsJsiValue(); -} - bool ReactNativeFeatureFlags::useShadowNodeStateOnClone() { return getAccessor().useShadowNodeStateOnClone(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 8ac677efac6..6f2b0c60d88 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<> + * @generated SignedSource<<6bc7cf8676a7ff3db3e3fc0669875996>> */ /** @@ -434,11 +434,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool useNativeViewConfigsInBridgelessMode(); - /** - * Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value - */ - RN_EXPORT static bool useRawPropsJsiValue(); - /** * Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family. */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 8f421b1cded..30006229036 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<<8bda4a084596c5512b8ebf5eaa44268e>> + * @generated SignedSource<<6b06f174bde31429a04437c34fb38453>> */ /** @@ -1451,24 +1451,6 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() { - auto flagValue = useRawPropsJsiValue_.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(79, "useRawPropsJsiValue"); - - flagValue = currentProvider_->useRawPropsJsiValue(); - useRawPropsJsiValue_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() { auto flagValue = useShadowNodeStateOnClone_.load(); @@ -1478,7 +1460,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(80, "useShadowNodeStateOnClone"); + markFlagAsAccessed(79, "useShadowNodeStateOnClone"); flagValue = currentProvider_->useShadowNodeStateOnClone(); useShadowNodeStateOnClone_ = flagValue; @@ -1496,7 +1478,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(81, "useSharedAnimatedBackend"); + markFlagAsAccessed(80, "useSharedAnimatedBackend"); flagValue = currentProvider_->useSharedAnimatedBackend(); useSharedAnimatedBackend_ = flagValue; @@ -1514,7 +1496,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(82, "useTraitHiddenOnAndroid"); + markFlagAsAccessed(81, "useTraitHiddenOnAndroid"); flagValue = currentProvider_->useTraitHiddenOnAndroid(); useTraitHiddenOnAndroid_ = flagValue; @@ -1532,7 +1514,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(83, "useTurboModuleInterop"); + markFlagAsAccessed(82, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -1550,7 +1532,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(84, "useTurboModules"); + markFlagAsAccessed(83, "useTurboModules"); flagValue = currentProvider_->useTurboModules(); useTurboModules_ = flagValue; @@ -1568,7 +1550,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(85, "viewCullingOutsetRatio"); + markFlagAsAccessed(84, "viewCullingOutsetRatio"); flagValue = currentProvider_->viewCullingOutsetRatio(); viewCullingOutsetRatio_ = flagValue; @@ -1586,7 +1568,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewHysteresisRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(86, "virtualViewHysteresisRatio"); + markFlagAsAccessed(85, "virtualViewHysteresisRatio"); flagValue = currentProvider_->virtualViewHysteresisRatio(); virtualViewHysteresisRatio_ = flagValue; @@ -1604,7 +1586,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(87, "virtualViewPrerenderRatio"); + markFlagAsAccessed(86, "virtualViewPrerenderRatio"); flagValue = currentProvider_->virtualViewPrerenderRatio(); virtualViewPrerenderRatio_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index cd725587710..38422ce21ae 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<> + * @generated SignedSource<> */ /** @@ -111,7 +111,6 @@ class ReactNativeFeatureFlagsAccessor { bool useAlwaysAvailableJSErrorHandling(); bool useFabricInterop(); bool useNativeViewConfigsInBridgelessMode(); - bool useRawPropsJsiValue(); bool useShadowNodeStateOnClone(); bool useSharedAnimatedBackend(); bool useTraitHiddenOnAndroid(); @@ -131,7 +130,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 88> accessedFeatureFlags_; + std::array, 87> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> cdpInteractionMetricsEnabled_; @@ -212,7 +211,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> useAlwaysAvailableJSErrorHandling_; std::atomic> useFabricInterop_; std::atomic> useNativeViewConfigsInBridgelessMode_; - std::atomic> useRawPropsJsiValue_; std::atomic> useShadowNodeStateOnClone_; std::atomic> useSharedAnimatedBackend_; std::atomic> useTraitHiddenOnAndroid_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index cfd77e1be5d..0bf831e5422 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<> + * @generated SignedSource<<5fb5b0f15594c9f65de484c77c7e4215>> */ /** @@ -343,10 +343,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool useRawPropsJsiValue() override { - return true; - } - bool useShadowNodeStateOnClone() override { return true; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index 77b9c94ad16..46f15c01838 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<<2f22164639286343590c3ec3ec5ab176>> */ /** @@ -756,15 +756,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::useNativeViewConfigsInBridgelessMode(); } - bool useRawPropsJsiValue() override { - auto value = values_["useRawPropsJsiValue"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::useRawPropsJsiValue(); - } - bool useShadowNodeStateOnClone() override { auto value = values_["useShadowNodeStateOnClone"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 309a9640023..799c202faee 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<<8e68f8be2e5f35422ae866390c76f670>> + * @generated SignedSource<> */ /** @@ -104,7 +104,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool useAlwaysAvailableJSErrorHandling() = 0; virtual bool useFabricInterop() = 0; virtual bool useNativeViewConfigsInBridgelessMode() = 0; - virtual bool useRawPropsJsiValue() = 0; virtual bool useShadowNodeStateOnClone() = 0; virtual bool useSharedAnimatedBackend() = 0; virtual bool useTraitHiddenOnAndroid() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index 7575785af07..e4a67d1a043 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<<3923fa1256c4cc2656201f9d83338606>> + * @generated SignedSource<> */ /** @@ -439,11 +439,6 @@ bool NativeReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode( return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode(); } -bool NativeReactNativeFeatureFlags::useRawPropsJsiValue( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::useRawPropsJsiValue(); -} - bool NativeReactNativeFeatureFlags::useShadowNodeStateOnClone( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::useShadowNodeStateOnClone(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 4c58c5c0305..a3f1f16bad5 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<<560b5619790e0d17e76bc3d600ca10d1>> + * @generated SignedSource<> */ /** @@ -194,8 +194,6 @@ class NativeReactNativeFeatureFlags bool useNativeViewConfigsInBridgelessMode(jsi::Runtime& runtime); - bool useRawPropsJsiValue(jsi::Runtime& runtime); - bool useShadowNodeStateOnClone(jsi::Runtime& runtime); bool useSharedAnimatedBackend(jsi::Runtime& runtime); diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.cpp b/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.cpp index aaf9519897f..71a3fb93fbe 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.cpp @@ -136,13 +136,7 @@ void RawPropsParser::preparse(const RawProps& rawProps) const noexcept { rawProps.keyIndexToValueIndex_[keyIndex] = valueIndex; auto value = object.getProperty(runtime, nameValue); - RawValue rawValue; - if (useRawPropsJsiValue_) { - rawValue = RawValue(runtime, std::move(value)); - } else { - rawValue = RawValue(jsi::dynamicFromValue(runtime, value)); - } - rawProps.values_.push_back(std::move(rawValue)); + rawProps.values_.emplace_back(runtime, std::move(value)); valueIndex++; } diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.h b/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.h index c5ff52c7260..ad28ae7b211 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.h @@ -7,7 +7,6 @@ #pragma once -#include #include #include #include @@ -27,11 +26,9 @@ class RawPropsParser final { /* * Default constructor. * To be used by `ConcreteComponentDescriptor` only. - * If `useRawPropsJsiValue` is `true`, the parser will use `jsi::Value` - * directly for RawValues instead of converting them to `folly::dynamic`. */ - RawPropsParser(bool useRawPropsJsiValue = ReactNativeFeatureFlags::useRawPropsJsiValue()) - : useRawPropsJsiValue_(useRawPropsJsiValue) {}; + RawPropsParser() = default; + [[deprecated]] explicit RawPropsParser(bool /* ignored */) : RawPropsParser() {} /* * To be used by `ConcreteComponentDescriptor` only. @@ -59,7 +56,6 @@ class RawPropsParser final { template friend class ConcreteComponentDescriptor; friend class RawProps; - bool useRawPropsJsiValue_{false}; /* * To be used by `RawProps` only. diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawValue.h b/packages/react-native/ReactCommon/react/renderer/core/RawValue.h index fd67679acd2..560b54a67a4 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawValue.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawValue.h @@ -405,8 +405,7 @@ class RawValue { static JsiValuePair castValue(const folly::dynamic & /*dynamic*/, JsiValuePair * /*type*/) { react_native_assert(false); - throw std::runtime_error( - "Cannot cast dynamic to a jsi::Value type. Please use the 'useRawPropsJsiValue' feature flag to enable jsi::Value support for RawValues."); + throw std::runtime_error("Cannot cast dynamic to a jsi::Value type"); } static JsiValuePair castValue(jsi::Runtime *runtime, const jsi::Value &value, JsiValuePair * /*type*/) diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 3d122c24882..89f772baa9a 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -889,16 +889,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'canary', }, - useRawPropsJsiValue: { - defaultValue: true, - metadata: { - description: - 'Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value', - expectedReleaseValue: true, - purpose: 'release', - }, - ossReleaseStage: 'none', - }, useShadowNodeStateOnClone: { defaultValue: true, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 25b8c620583..b8e1ab47ca0 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<<02b24e5c75fb8d34646670771ac3b2ed>> * @flow strict * @noformat */ @@ -130,7 +130,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ useAlwaysAvailableJSErrorHandling: Getter, useFabricInterop: Getter, useNativeViewConfigsInBridgelessMode: Getter, - useRawPropsJsiValue: Getter, useShadowNodeStateOnClone: Getter, useSharedAnimatedBackend: Getter, useTraitHiddenOnAndroid: Getter, @@ -541,10 +540,6 @@ export const useFabricInterop: Getter = createNativeFlagGetter('useFabr * When enabled, the native view configs are used in bridgeless mode. */ export const useNativeViewConfigsInBridgelessMode: Getter = createNativeFlagGetter('useNativeViewConfigsInBridgelessMode', false); -/** - * Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value - */ -export const useRawPropsJsiValue: Getter = createNativeFlagGetter('useRawPropsJsiValue', true); /** * Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family. */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index c5ea2bbfab9..27ddaf93678 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<<14b4f8916fccd1d255b4a260556d11da>> + * @generated SignedSource<> * @flow strict * @noformat */ @@ -104,7 +104,6 @@ export interface Spec extends TurboModule { +useAlwaysAvailableJSErrorHandling?: () => boolean; +useFabricInterop?: () => boolean; +useNativeViewConfigsInBridgelessMode?: () => boolean; - +useRawPropsJsiValue?: () => boolean; +useShadowNodeStateOnClone?: () => boolean; +useSharedAnimatedBackend?: () => boolean; +useTraitHiddenOnAndroid?: () => boolean;