react-native-tvos 0.79.1-1 → 0.79.3-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/Libraries/AppDelegate/RCTReactNativeFactory.mm +8 -0
  2. package/Libraries/Blob/URL.js +13 -1
  3. package/Libraries/Core/ReactNativeVersion.js +2 -2
  4. package/README.md +3 -1
  5. package/React/Base/RCTRootView.h +7 -1
  6. package/React/Base/RCTRootView.m +38 -0
  7. package/React/Base/RCTRootViewInternal.h +1 -0
  8. package/React/Base/RCTTVRemoteSelectHandler.m +2 -1
  9. package/React/Base/RCTVersion.m +2 -2
  10. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.h +6 -0
  11. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +37 -0
  12. package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +12 -0
  13. package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +18 -0
  14. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +18 -4
  15. package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +1 -1
  16. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +3 -5
  17. package/React/Views/RCTTVView.m +4 -4
  18. package/ReactAndroid/gradle.properties +1 -1
  19. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +13 -1
  20. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +21 -1
  21. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +5 -1
  22. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +5 -1
  23. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +23 -1
  24. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android.kt +4 -0
  25. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +5 -1
  26. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
  27. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BorderRadiusStyle.kt +2 -2
  28. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +0 -3
  29. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +29 -1
  30. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +7 -1
  31. package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
  32. package/ReactCommon/jsc/React-jsc.podspec +1 -1
  33. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +9 -1
  34. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +11 -1
  35. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +45 -9
  36. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +6 -2
  37. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +9 -1
  38. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +19 -1
  39. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +3 -1
  40. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +11 -1
  41. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +5 -1
  42. package/ReactCommon/react/renderer/core/ShadowNode.cpp +14 -4
  43. package/ReactCommon/react/renderer/core/ShadowNode.h +6 -0
  44. package/ReactCommon/react/renderer/mounting/updateMountedFlag.cpp +6 -0
  45. package/ReactCommon/react/runtime/TimerManager.cpp +6 -4
  46. package/ReactCommon/react/runtime/TimerManager.h +3 -1
  47. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +0 -1
  48. package/ReactCommon/react/runtime/tests/cxx/ReactInstanceTest.cpp +9 -5
  49. package/package.json +8 -8
  50. package/scripts/codegen/generate-artifacts-executor.js +53 -18
  51. package/sdks/.hermesversion +1 -1
  52. package/sdks/hermesc/osx-bin/hermes +0 -0
  53. package/sdks/hermesc/osx-bin/hermesc +0 -0
  54. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  55. package/src/private/featureflags/ReactNativeFeatureFlags.js +11 -1
  56. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -1
  57. package/types/index.d.ts +1 -1
  58. package/types/tsconfig.test.json +16 -0
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<e5c1e722f33148fe3aa36ccab62e2293>>
7
+ * @generated SignedSource<<8f5180a0ef154c083ac38d28e650ee11>>
8
8
  */
9
9
 
10
10
  /**
@@ -59,12 +59,14 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
59
59
  private var removeTurboModuleManagerDelegateMutexCache: Boolean? = null
60
60
  private var throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOSCache: Boolean? = null
61
61
  private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
62
+ private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
62
63
  private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
63
64
  private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
64
65
  private var useFabricInteropCache: Boolean? = null
65
66
  private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
66
67
  private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
67
68
  private var useRawPropsJsiValueCache: Boolean? = null
69
+ private var useShadowNodeStateOnCloneCache: Boolean? = null
68
70
  private var useTurboModuleInteropCache: Boolean? = null
69
71
  private var useTurboModulesCache: Boolean? = null
70
72
 
@@ -418,6 +420,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
418
420
  return cached
419
421
  }
420
422
 
423
+ override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean {
424
+ var cached = updateRuntimeShadowNodeReferencesOnCommitCache
425
+ if (cached == null) {
426
+ cached = currentProvider.updateRuntimeShadowNodeReferencesOnCommit()
427
+ accessedFeatureFlags.add("updateRuntimeShadowNodeReferencesOnCommit")
428
+ updateRuntimeShadowNodeReferencesOnCommitCache = cached
429
+ }
430
+ return cached
431
+ }
432
+
421
433
  override fun useAlwaysAvailableJSErrorHandling(): Boolean {
422
434
  var cached = useAlwaysAvailableJSErrorHandlingCache
423
435
  if (cached == null) {
@@ -478,6 +490,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
478
490
  return cached
479
491
  }
480
492
 
493
+ override fun useShadowNodeStateOnClone(): Boolean {
494
+ var cached = useShadowNodeStateOnCloneCache
495
+ if (cached == null) {
496
+ cached = currentProvider.useShadowNodeStateOnClone()
497
+ accessedFeatureFlags.add("useShadowNodeStateOnClone")
498
+ useShadowNodeStateOnCloneCache = cached
499
+ }
500
+ return cached
501
+ }
502
+
481
503
  override fun useTurboModuleInterop(): Boolean {
482
504
  var cached = useTurboModuleInteropCache
483
505
  if (cached == null) {
@@ -17,4 +17,8 @@ public class ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android(
17
17
  override fun enableFabricRenderer(): Boolean = bridgelessEnabled || fabricEnabled
18
18
 
19
19
  override fun useTurboModules(): Boolean = bridgelessEnabled || turboModulesEnabled
20
+
21
+ override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = true
22
+
23
+ override fun useShadowNodeStateOnClone(): Boolean = true
20
24
  }
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<9a223b4f79e4612eb193036256bfebc5>>
7
+ * @generated SignedSource<<33571f99b1f78fbc62cecfca5f8351fa>>
8
8
  */
9
9
 
10
10
  /**
@@ -93,6 +93,8 @@ public interface ReactNativeFeatureFlagsProvider {
93
93
 
94
94
  @DoNotStrip public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
95
95
 
96
+ @DoNotStrip public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
97
+
96
98
  @DoNotStrip public fun useAlwaysAvailableJSErrorHandling(): Boolean
97
99
 
98
100
  @DoNotStrip public fun useEditTextStockAndroidFocusBehavior(): Boolean
@@ -105,6 +107,8 @@ public interface ReactNativeFeatureFlagsProvider {
105
107
 
106
108
  @DoNotStrip public fun useRawPropsJsiValue(): Boolean
107
109
 
110
+ @DoNotStrip public fun useShadowNodeStateOnClone(): Boolean
111
+
108
112
  @DoNotStrip public fun useTurboModuleInterop(): Boolean
109
113
 
110
114
  @DoNotStrip public fun useTurboModules(): Boolean
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
17
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
18
  "major", 0,
19
19
  "minor", 79,
20
- "patch", 1,
21
- "prerelease", "1");
20
+ "patch", 3,
21
+ "prerelease", "0");
22
22
  }
@@ -136,10 +136,10 @@ internal data class BorderRadiusStyle(
136
136
  (startStart ?: topStart ?: topLeft ?: uniform)?.resolve(width, height)
137
137
  ?: zeroRadii,
138
138
  bottomLeft =
139
- (endEnd ?: bottomStart ?: bottomRight ?: uniform)?.resolve(width, height)
139
+ (endEnd ?: bottomEnd ?: bottomRight ?: uniform)?.resolve(width, height)
140
140
  ?: zeroRadii,
141
141
  bottomRight =
142
- (startEnd ?: bottomEnd ?: bottomLeft ?: uniform)?.resolve(width, height)
142
+ (startEnd ?: bottomStart ?: bottomLeft ?: uniform)?.resolve(width, height)
143
143
  ?: zeroRadii,
144
144
  width = width,
145
145
  height = height,
@@ -710,9 +710,6 @@ public class ReactViewGroup extends ViewGroup
710
710
  UiThreadUtil.assertOnUiThread();
711
711
  checkViewClippingTag(child, Boolean.TRUE);
712
712
  if (!customDrawOrderDisabled()) {
713
- if (indexOfChild(child) == -1) {
714
- return;
715
- }
716
713
  getDrawingOrderHelper().handleRemoveView(child);
717
714
  setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder());
718
715
  } else {
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<91c1a65790aa5946a354ab8a1966a5f4>>
7
+ * @generated SignedSource<<83b23039ed9fff5109ff3b532648baac>>
8
8
  */
9
9
 
10
10
  /**
@@ -249,6 +249,12 @@ class ReactNativeFeatureFlagsProviderHolder
249
249
  return method(javaProvider_);
250
250
  }
251
251
 
252
+ bool updateRuntimeShadowNodeReferencesOnCommit() override {
253
+ static const auto method =
254
+ getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("updateRuntimeShadowNodeReferencesOnCommit");
255
+ return method(javaProvider_);
256
+ }
257
+
252
258
  bool useAlwaysAvailableJSErrorHandling() override {
253
259
  static const auto method =
254
260
  getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useAlwaysAvailableJSErrorHandling");
@@ -285,6 +291,12 @@ class ReactNativeFeatureFlagsProviderHolder
285
291
  return method(javaProvider_);
286
292
  }
287
293
 
294
+ bool useShadowNodeStateOnClone() override {
295
+ static const auto method =
296
+ getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useShadowNodeStateOnClone");
297
+ return method(javaProvider_);
298
+ }
299
+
288
300
  bool useTurboModuleInterop() override {
289
301
  static const auto method =
290
302
  getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useTurboModuleInterop");
@@ -476,6 +488,11 @@ bool JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndr
476
488
  return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
477
489
  }
478
490
 
491
+ bool JReactNativeFeatureFlagsCxxInterop::updateRuntimeShadowNodeReferencesOnCommit(
492
+ facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
493
+ return ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit();
494
+ }
495
+
479
496
  bool JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling(
480
497
  facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
481
498
  return ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling();
@@ -506,6 +523,11 @@ bool JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue(
506
523
  return ReactNativeFeatureFlags::useRawPropsJsiValue();
507
524
  }
508
525
 
526
+ bool JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone(
527
+ facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
528
+ return ReactNativeFeatureFlags::useShadowNodeStateOnClone();
529
+ }
530
+
509
531
  bool JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop(
510
532
  facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
511
533
  return ReactNativeFeatureFlags::useTurboModuleInterop();
@@ -652,6 +674,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
652
674
  makeNativeMethod(
653
675
  "traceTurboModulePromiseRejectionsOnAndroid",
654
676
  JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid),
677
+ makeNativeMethod(
678
+ "updateRuntimeShadowNodeReferencesOnCommit",
679
+ JReactNativeFeatureFlagsCxxInterop::updateRuntimeShadowNodeReferencesOnCommit),
655
680
  makeNativeMethod(
656
681
  "useAlwaysAvailableJSErrorHandling",
657
682
  JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling),
@@ -670,6 +695,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
670
695
  makeNativeMethod(
671
696
  "useRawPropsJsiValue",
672
697
  JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue),
698
+ makeNativeMethod(
699
+ "useShadowNodeStateOnClone",
700
+ JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone),
673
701
  makeNativeMethod(
674
702
  "useTurboModuleInterop",
675
703
  JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop),
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<610104213a5eba23b797e27377d71b52>>
7
+ * @generated SignedSource<<efb0288fd19fb35e4582522c835301b4>>
8
8
  */
9
9
 
10
10
  /**
@@ -135,6 +135,9 @@ class JReactNativeFeatureFlagsCxxInterop
135
135
  static bool traceTurboModulePromiseRejectionsOnAndroid(
136
136
  facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
137
137
 
138
+ static bool updateRuntimeShadowNodeReferencesOnCommit(
139
+ facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
140
+
138
141
  static bool useAlwaysAvailableJSErrorHandling(
139
142
  facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
140
143
 
@@ -153,6 +156,9 @@ class JReactNativeFeatureFlagsCxxInterop
153
156
  static bool useRawPropsJsiValue(
154
157
  facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
155
158
 
159
+ static bool useShadowNodeStateOnClone(
160
+ facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
161
+
156
162
  static bool useTurboModuleInterop(
157
163
  facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
158
164
 
@@ -17,8 +17,8 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 79;
20
- int32_t Patch = 1;
21
- std::string_view Prerelease = "1";
20
+ int32_t Patch = 3;
21
+ std::string_view Prerelease = "0";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -32,6 +32,6 @@ Pod::Spec.new do |s|
32
32
  s.dependency "React-jsi", version
33
33
 
34
34
  s.subspec "Fabric" do |ss|
35
- ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)" }
35
+ ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)", "DEFINES_MODULE" => "YES" }
36
36
  end
37
37
  end
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<3d4eefc7af1e9d594ade8339c261ca01>>
7
+ * @generated SignedSource<<661a4193f9ba7af0c963bc13751deb15>>
8
8
  */
9
9
 
10
10
  /**
@@ -166,6 +166,10 @@ bool ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid() {
166
166
  return getAccessor().traceTurboModulePromiseRejectionsOnAndroid();
167
167
  }
168
168
 
169
+ bool ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit() {
170
+ return getAccessor().updateRuntimeShadowNodeReferencesOnCommit();
171
+ }
172
+
169
173
  bool ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling() {
170
174
  return getAccessor().useAlwaysAvailableJSErrorHandling();
171
175
  }
@@ -190,6 +194,10 @@ bool ReactNativeFeatureFlags::useRawPropsJsiValue() {
190
194
  return getAccessor().useRawPropsJsiValue();
191
195
  }
192
196
 
197
+ bool ReactNativeFeatureFlags::useShadowNodeStateOnClone() {
198
+ return getAccessor().useShadowNodeStateOnClone();
199
+ }
200
+
193
201
  bool ReactNativeFeatureFlags::useTurboModuleInterop() {
194
202
  return getAccessor().useTurboModuleInterop();
195
203
  }
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<55a526204b386d34058c86183d5b97ac>>
7
+ * @generated SignedSource<<53e965423f2957b37e0470c607cc45a4>>
8
8
  */
9
9
 
10
10
  /**
@@ -214,6 +214,11 @@ class ReactNativeFeatureFlags {
214
214
  */
215
215
  RN_EXPORT static bool traceTurboModulePromiseRejectionsOnAndroid();
216
216
 
217
+ /**
218
+ * When enabled, runtime shadow node references will be updated during the commit. This allows running RSNRU from any thread without corrupting the renderer state.
219
+ */
220
+ RN_EXPORT static bool updateRuntimeShadowNodeReferencesOnCommit();
221
+
217
222
  /**
218
223
  * In Bridgeless mode, use the always available javascript error reporting pipeline.
219
224
  */
@@ -244,6 +249,11 @@ class ReactNativeFeatureFlags {
244
249
  */
245
250
  RN_EXPORT static bool useRawPropsJsiValue();
246
251
 
252
+ /**
253
+ * 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.
254
+ */
255
+ RN_EXPORT static bool useShadowNodeStateOnClone();
256
+
247
257
  /**
248
258
  * In Bridgeless mode, should legacy NativeModules use the TurboModule system?
249
259
  */
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<c30a4dea1d32e2838f6e5db6442a3f78>>
7
+ * @generated SignedSource<<5ff3ac57eb17d9b6642d98f2fc35bd9d>>
8
8
  */
9
9
 
10
10
  /**
@@ -659,6 +659,24 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
659
659
  return flagValue.value();
660
660
  }
661
661
 
662
+ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit() {
663
+ auto flagValue = updateRuntimeShadowNodeReferencesOnCommit_.load();
664
+
665
+ if (!flagValue.has_value()) {
666
+ // This block is not exclusive but it is not necessary.
667
+ // If multiple threads try to initialize the feature flag, we would only
668
+ // be accessing the provider multiple times but the end state of this
669
+ // instance and the returned flag value would be the same.
670
+
671
+ markFlagAsAccessed(35, "updateRuntimeShadowNodeReferencesOnCommit");
672
+
673
+ flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
674
+ updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
675
+ }
676
+
677
+ return flagValue.value();
678
+ }
679
+
662
680
  bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
663
681
  auto flagValue = useAlwaysAvailableJSErrorHandling_.load();
664
682
 
@@ -668,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
668
686
  // be accessing the provider multiple times but the end state of this
669
687
  // instance and the returned flag value would be the same.
670
688
 
671
- markFlagAsAccessed(35, "useAlwaysAvailableJSErrorHandling");
689
+ markFlagAsAccessed(36, "useAlwaysAvailableJSErrorHandling");
672
690
 
673
691
  flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
674
692
  useAlwaysAvailableJSErrorHandling_ = flagValue;
@@ -686,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::useEditTextStockAndroidFocusBehavior() {
686
704
  // be accessing the provider multiple times but the end state of this
687
705
  // instance and the returned flag value would be the same.
688
706
 
689
- markFlagAsAccessed(36, "useEditTextStockAndroidFocusBehavior");
707
+ markFlagAsAccessed(37, "useEditTextStockAndroidFocusBehavior");
690
708
 
691
709
  flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior();
692
710
  useEditTextStockAndroidFocusBehavior_ = flagValue;
@@ -704,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
704
722
  // be accessing the provider multiple times but the end state of this
705
723
  // instance and the returned flag value would be the same.
706
724
 
707
- markFlagAsAccessed(37, "useFabricInterop");
725
+ markFlagAsAccessed(38, "useFabricInterop");
708
726
 
709
727
  flagValue = currentProvider_->useFabricInterop();
710
728
  useFabricInterop_ = flagValue;
@@ -722,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
722
740
  // be accessing the provider multiple times but the end state of this
723
741
  // instance and the returned flag value would be the same.
724
742
 
725
- markFlagAsAccessed(38, "useNativeViewConfigsInBridgelessMode");
743
+ markFlagAsAccessed(39, "useNativeViewConfigsInBridgelessMode");
726
744
 
727
745
  flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
728
746
  useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -740,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
740
758
  // be accessing the provider multiple times but the end state of this
741
759
  // instance and the returned flag value would be the same.
742
760
 
743
- markFlagAsAccessed(39, "useOptimizedEventBatchingOnAndroid");
761
+ markFlagAsAccessed(40, "useOptimizedEventBatchingOnAndroid");
744
762
 
745
763
  flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
746
764
  useOptimizedEventBatchingOnAndroid_ = flagValue;
@@ -758,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
758
776
  // be accessing the provider multiple times but the end state of this
759
777
  // instance and the returned flag value would be the same.
760
778
 
761
- markFlagAsAccessed(40, "useRawPropsJsiValue");
779
+ markFlagAsAccessed(41, "useRawPropsJsiValue");
762
780
 
763
781
  flagValue = currentProvider_->useRawPropsJsiValue();
764
782
  useRawPropsJsiValue_ = flagValue;
@@ -767,6 +785,24 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
767
785
  return flagValue.value();
768
786
  }
769
787
 
788
+ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
789
+ auto flagValue = useShadowNodeStateOnClone_.load();
790
+
791
+ if (!flagValue.has_value()) {
792
+ // This block is not exclusive but it is not necessary.
793
+ // If multiple threads try to initialize the feature flag, we would only
794
+ // be accessing the provider multiple times but the end state of this
795
+ // instance and the returned flag value would be the same.
796
+
797
+ markFlagAsAccessed(42, "useShadowNodeStateOnClone");
798
+
799
+ flagValue = currentProvider_->useShadowNodeStateOnClone();
800
+ useShadowNodeStateOnClone_ = flagValue;
801
+ }
802
+
803
+ return flagValue.value();
804
+ }
805
+
770
806
  bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
771
807
  auto flagValue = useTurboModuleInterop_.load();
772
808
 
@@ -776,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
776
812
  // be accessing the provider multiple times but the end state of this
777
813
  // instance and the returned flag value would be the same.
778
814
 
779
- markFlagAsAccessed(41, "useTurboModuleInterop");
815
+ markFlagAsAccessed(43, "useTurboModuleInterop");
780
816
 
781
817
  flagValue = currentProvider_->useTurboModuleInterop();
782
818
  useTurboModuleInterop_ = flagValue;
@@ -794,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
794
830
  // be accessing the provider multiple times but the end state of this
795
831
  // instance and the returned flag value would be the same.
796
832
 
797
- markFlagAsAccessed(42, "useTurboModules");
833
+ markFlagAsAccessed(44, "useTurboModules");
798
834
 
799
835
  flagValue = currentProvider_->useTurboModules();
800
836
  useTurboModules_ = flagValue;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<95aa4a8b8859f26b901112df1517b1f1>>
7
+ * @generated SignedSource<<267385c8df88a5d1eb7f1e2478209d39>>
8
8
  */
9
9
 
10
10
  /**
@@ -67,12 +67,14 @@ class ReactNativeFeatureFlagsAccessor {
67
67
  bool removeTurboModuleManagerDelegateMutex();
68
68
  bool throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS();
69
69
  bool traceTurboModulePromiseRejectionsOnAndroid();
70
+ bool updateRuntimeShadowNodeReferencesOnCommit();
70
71
  bool useAlwaysAvailableJSErrorHandling();
71
72
  bool useEditTextStockAndroidFocusBehavior();
72
73
  bool useFabricInterop();
73
74
  bool useNativeViewConfigsInBridgelessMode();
74
75
  bool useOptimizedEventBatchingOnAndroid();
75
76
  bool useRawPropsJsiValue();
77
+ bool useShadowNodeStateOnClone();
76
78
  bool useTurboModuleInterop();
77
79
  bool useTurboModules();
78
80
 
@@ -86,7 +88,7 @@ class ReactNativeFeatureFlagsAccessor {
86
88
  std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
87
89
  bool wasOverridden_;
88
90
 
89
- std::array<std::atomic<const char*>, 43> accessedFeatureFlags_;
91
+ std::array<std::atomic<const char*>, 45> accessedFeatureFlags_;
90
92
 
91
93
  std::atomic<std::optional<bool>> commonTestFlag_;
92
94
  std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
@@ -123,12 +125,14 @@ class ReactNativeFeatureFlagsAccessor {
123
125
  std::atomic<std::optional<bool>> removeTurboModuleManagerDelegateMutex_;
124
126
  std::atomic<std::optional<bool>> throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS_;
125
127
  std::atomic<std::optional<bool>> traceTurboModulePromiseRejectionsOnAndroid_;
128
+ std::atomic<std::optional<bool>> updateRuntimeShadowNodeReferencesOnCommit_;
126
129
  std::atomic<std::optional<bool>> useAlwaysAvailableJSErrorHandling_;
127
130
  std::atomic<std::optional<bool>> useEditTextStockAndroidFocusBehavior_;
128
131
  std::atomic<std::optional<bool>> useFabricInterop_;
129
132
  std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
130
133
  std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
131
134
  std::atomic<std::optional<bool>> useRawPropsJsiValue_;
135
+ std::atomic<std::optional<bool>> useShadowNodeStateOnClone_;
132
136
  std::atomic<std::optional<bool>> useTurboModuleInterop_;
133
137
  std::atomic<std::optional<bool>> useTurboModules_;
134
138
  };
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<e80434127379886a001ffcbace6ba619>>
7
+ * @generated SignedSource<<48bb4ea50c42676aee161ea1594a6aec>>
8
8
  */
9
9
 
10
10
  /**
@@ -167,6 +167,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
167
167
  return false;
168
168
  }
169
169
 
170
+ bool updateRuntimeShadowNodeReferencesOnCommit() override {
171
+ return false;
172
+ }
173
+
170
174
  bool useAlwaysAvailableJSErrorHandling() override {
171
175
  return false;
172
176
  }
@@ -191,6 +195,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
191
195
  return false;
192
196
  }
193
197
 
198
+ bool useShadowNodeStateOnClone() override {
199
+ return false;
200
+ }
201
+
194
202
  bool useTurboModuleInterop() override {
195
203
  return false;
196
204
  }
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<21aeeeaa1a402f91b616180114887a58>>
7
+ * @generated SignedSource<<e92353bf22b82344bc6ab97f08ca724c>>
8
8
  */
9
9
 
10
10
  /**
@@ -360,6 +360,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
360
360
  return ReactNativeFeatureFlagsDefaults::traceTurboModulePromiseRejectionsOnAndroid();
361
361
  }
362
362
 
363
+ bool updateRuntimeShadowNodeReferencesOnCommit() override {
364
+ auto value = values_["updateRuntimeShadowNodeReferencesOnCommit"];
365
+ if (!value.isNull()) {
366
+ return value.getBool();
367
+ }
368
+
369
+ return ReactNativeFeatureFlagsDefaults::updateRuntimeShadowNodeReferencesOnCommit();
370
+ }
371
+
363
372
  bool useAlwaysAvailableJSErrorHandling() override {
364
373
  auto value = values_["useAlwaysAvailableJSErrorHandling"];
365
374
  if (!value.isNull()) {
@@ -414,6 +423,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
414
423
  return ReactNativeFeatureFlagsDefaults::useRawPropsJsiValue();
415
424
  }
416
425
 
426
+ bool useShadowNodeStateOnClone() override {
427
+ auto value = values_["useShadowNodeStateOnClone"];
428
+ if (!value.isNull()) {
429
+ return value.getBool();
430
+ }
431
+
432
+ return ReactNativeFeatureFlagsDefaults::useShadowNodeStateOnClone();
433
+ }
434
+
417
435
  bool useTurboModuleInterop() override {
418
436
  auto value = values_["useTurboModuleInterop"];
419
437
  if (!value.isNull()) {
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<b4ba05d9dee950f242db8f3a830a75da>>
7
+ * @generated SignedSource<<d8f7773c6f24c715a6c0e0ab703677fd>>
8
8
  */
9
9
 
10
10
  /**
@@ -60,12 +60,14 @@ class ReactNativeFeatureFlagsProvider {
60
60
  virtual bool removeTurboModuleManagerDelegateMutex() = 0;
61
61
  virtual bool throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS() = 0;
62
62
  virtual bool traceTurboModulePromiseRejectionsOnAndroid() = 0;
63
+ virtual bool updateRuntimeShadowNodeReferencesOnCommit() = 0;
63
64
  virtual bool useAlwaysAvailableJSErrorHandling() = 0;
64
65
  virtual bool useEditTextStockAndroidFocusBehavior() = 0;
65
66
  virtual bool useFabricInterop() = 0;
66
67
  virtual bool useNativeViewConfigsInBridgelessMode() = 0;
67
68
  virtual bool useOptimizedEventBatchingOnAndroid() = 0;
68
69
  virtual bool useRawPropsJsiValue() = 0;
70
+ virtual bool useShadowNodeStateOnClone() = 0;
69
71
  virtual bool useTurboModuleInterop() = 0;
70
72
  virtual bool useTurboModules() = 0;
71
73
  };
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<651dc228bd4959a90c82de905a8b6c40>>
7
+ * @generated SignedSource<<76f1f689940817c1df6ace2f8dd062e7>>
8
8
  */
9
9
 
10
10
  /**
@@ -219,6 +219,11 @@ bool NativeReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid(
219
219
  return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
220
220
  }
221
221
 
222
+ bool NativeReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit(
223
+ jsi::Runtime& /*runtime*/) {
224
+ return ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit();
225
+ }
226
+
222
227
  bool NativeReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling(
223
228
  jsi::Runtime& /*runtime*/) {
224
229
  return ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling();
@@ -249,6 +254,11 @@ bool NativeReactNativeFeatureFlags::useRawPropsJsiValue(
249
254
  return ReactNativeFeatureFlags::useRawPropsJsiValue();
250
255
  }
251
256
 
257
+ bool NativeReactNativeFeatureFlags::useShadowNodeStateOnClone(
258
+ jsi::Runtime& /*runtime*/) {
259
+ return ReactNativeFeatureFlags::useShadowNodeStateOnClone();
260
+ }
261
+
252
262
  bool NativeReactNativeFeatureFlags::useTurboModuleInterop(
253
263
  jsi::Runtime& /*runtime*/) {
254
264
  return ReactNativeFeatureFlags::useTurboModuleInterop();
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<1a082675338773d1a6259fabfd2f652f>>
7
+ * @generated SignedSource<<af8c15575ff94feff9dadaaf8becdf18>>
8
8
  */
9
9
 
10
10
  /**
@@ -107,6 +107,8 @@ class NativeReactNativeFeatureFlags
107
107
 
108
108
  bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime& runtime);
109
109
 
110
+ bool updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime& runtime);
111
+
110
112
  bool useAlwaysAvailableJSErrorHandling(jsi::Runtime& runtime);
111
113
 
112
114
  bool useEditTextStockAndroidFocusBehavior(jsi::Runtime& runtime);
@@ -119,6 +121,8 @@ class NativeReactNativeFeatureFlags
119
121
 
120
122
  bool useRawPropsJsiValue(jsi::Runtime& runtime);
121
123
 
124
+ bool useShadowNodeStateOnClone(jsi::Runtime& runtime);
125
+
122
126
  bool useTurboModuleInterop(jsi::Runtime& runtime);
123
127
 
124
128
  bool useTurboModules(jsi::Runtime& runtime);