react-native 0.79.0 → 0.79.2
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.
- package/Libraries/AppDelegate/RCTReactNativeFactory.mm +8 -0
- package/Libraries/Blob/URL.js +13 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +12 -0
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +18 -0
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +22 -13
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/ReleaseDevSupportManager.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +13 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +21 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +23 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +29 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +7 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +9 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +11 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +45 -9
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +6 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +9 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +19 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +3 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +11 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +5 -1
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +14 -4
- package/ReactCommon/react/renderer/core/ShadowNode.h +6 -0
- package/ReactCommon/react/renderer/mounting/updateMountedFlag.cpp +6 -0
- package/package.json +8 -8
- package/scripts/codegen/generate-artifacts-executor.js +8 -8
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +11 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -1
|
@@ -314,6 +314,14 @@ class RCTAppDelegateBridgelessFeatureFlags : public ReactNativeFeatureFlagsDefau
|
|
|
314
314
|
{
|
|
315
315
|
return true;
|
|
316
316
|
}
|
|
317
|
+
bool updateRuntimeShadowNodeReferencesOnCommit() override
|
|
318
|
+
{
|
|
319
|
+
return true;
|
|
320
|
+
}
|
|
321
|
+
bool useShadowNodeStateOnClone() override
|
|
322
|
+
{
|
|
323
|
+
return true;
|
|
324
|
+
}
|
|
317
325
|
};
|
|
318
326
|
|
|
319
327
|
- (void)_setUpFeatureFlags
|
package/Libraries/Blob/URL.js
CHANGED
|
@@ -81,7 +81,19 @@ export class URL {
|
|
|
81
81
|
let baseUrl = null;
|
|
82
82
|
if (!base || validateBaseUrl(url)) {
|
|
83
83
|
this._url = url;
|
|
84
|
-
if (
|
|
84
|
+
if (this._url.includes('#')) {
|
|
85
|
+
const split = this._url.split('#');
|
|
86
|
+
const beforeHash = split[0];
|
|
87
|
+
const website = beforeHash.split('://')[1];
|
|
88
|
+
if (!website.includes('/')) {
|
|
89
|
+
this._url = split.join('/#');
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (
|
|
94
|
+
!this._url.endsWith('/') &&
|
|
95
|
+
!(this._url.includes('?') || this._url.includes('#'))
|
|
96
|
+
) {
|
|
85
97
|
this._url += '/';
|
|
86
98
|
}
|
|
87
99
|
} else {
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -191,6 +191,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_traceTu
|
|
|
191
191
|
rt
|
|
192
192
|
);
|
|
193
193
|
}
|
|
194
|
+
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
195
|
+
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->updateRuntimeShadowNodeReferencesOnCommit(
|
|
196
|
+
rt
|
|
197
|
+
);
|
|
198
|
+
}
|
|
194
199
|
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useAlwaysAvailableJSErrorHandling(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
195
200
|
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->useAlwaysAvailableJSErrorHandling(
|
|
196
201
|
rt
|
|
@@ -221,6 +226,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useRawP
|
|
|
221
226
|
rt
|
|
222
227
|
);
|
|
223
228
|
}
|
|
229
|
+
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useShadowNodeStateOnClone(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
230
|
+
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->useShadowNodeStateOnClone(
|
|
231
|
+
rt
|
|
232
|
+
);
|
|
233
|
+
}
|
|
224
234
|
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useTurboModuleInterop(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
225
235
|
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->useTurboModuleInterop(
|
|
226
236
|
rt
|
|
@@ -270,12 +280,14 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI
|
|
|
270
280
|
methodMap_["removeTurboModuleManagerDelegateMutex"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_removeTurboModuleManagerDelegateMutex};
|
|
271
281
|
methodMap_["throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS};
|
|
272
282
|
methodMap_["traceTurboModulePromiseRejectionsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_traceTurboModulePromiseRejectionsOnAndroid};
|
|
283
|
+
methodMap_["updateRuntimeShadowNodeReferencesOnCommit"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_updateRuntimeShadowNodeReferencesOnCommit};
|
|
273
284
|
methodMap_["useAlwaysAvailableJSErrorHandling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useAlwaysAvailableJSErrorHandling};
|
|
274
285
|
methodMap_["useEditTextStockAndroidFocusBehavior"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useEditTextStockAndroidFocusBehavior};
|
|
275
286
|
methodMap_["useFabricInterop"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useFabricInterop};
|
|
276
287
|
methodMap_["useNativeViewConfigsInBridgelessMode"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeViewConfigsInBridgelessMode};
|
|
277
288
|
methodMap_["useOptimizedEventBatchingOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useOptimizedEventBatchingOnAndroid};
|
|
278
289
|
methodMap_["useRawPropsJsiValue"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useRawPropsJsiValue};
|
|
290
|
+
methodMap_["useShadowNodeStateOnClone"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useShadowNodeStateOnClone};
|
|
279
291
|
methodMap_["useTurboModuleInterop"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useTurboModuleInterop};
|
|
280
292
|
methodMap_["useTurboModules"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useTurboModules};
|
|
281
293
|
}
|
|
@@ -56,12 +56,14 @@ public:
|
|
|
56
56
|
virtual bool removeTurboModuleManagerDelegateMutex(jsi::Runtime &rt) = 0;
|
|
57
57
|
virtual bool throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS(jsi::Runtime &rt) = 0;
|
|
58
58
|
virtual bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt) = 0;
|
|
59
|
+
virtual bool updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime &rt) = 0;
|
|
59
60
|
virtual bool useAlwaysAvailableJSErrorHandling(jsi::Runtime &rt) = 0;
|
|
60
61
|
virtual bool useEditTextStockAndroidFocusBehavior(jsi::Runtime &rt) = 0;
|
|
61
62
|
virtual bool useFabricInterop(jsi::Runtime &rt) = 0;
|
|
62
63
|
virtual bool useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt) = 0;
|
|
63
64
|
virtual bool useOptimizedEventBatchingOnAndroid(jsi::Runtime &rt) = 0;
|
|
64
65
|
virtual bool useRawPropsJsiValue(jsi::Runtime &rt) = 0;
|
|
66
|
+
virtual bool useShadowNodeStateOnClone(jsi::Runtime &rt) = 0;
|
|
65
67
|
virtual bool useTurboModuleInterop(jsi::Runtime &rt) = 0;
|
|
66
68
|
virtual bool useTurboModules(jsi::Runtime &rt) = 0;
|
|
67
69
|
|
|
@@ -382,6 +384,14 @@ private:
|
|
|
382
384
|
return bridging::callFromJs<bool>(
|
|
383
385
|
rt, &T::traceTurboModulePromiseRejectionsOnAndroid, jsInvoker_, instance_);
|
|
384
386
|
}
|
|
387
|
+
bool updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime &rt) override {
|
|
388
|
+
static_assert(
|
|
389
|
+
bridging::getParameterCount(&T::updateRuntimeShadowNodeReferencesOnCommit) == 1,
|
|
390
|
+
"Expected updateRuntimeShadowNodeReferencesOnCommit(...) to have 1 parameters");
|
|
391
|
+
|
|
392
|
+
return bridging::callFromJs<bool>(
|
|
393
|
+
rt, &T::updateRuntimeShadowNodeReferencesOnCommit, jsInvoker_, instance_);
|
|
394
|
+
}
|
|
385
395
|
bool useAlwaysAvailableJSErrorHandling(jsi::Runtime &rt) override {
|
|
386
396
|
static_assert(
|
|
387
397
|
bridging::getParameterCount(&T::useAlwaysAvailableJSErrorHandling) == 1,
|
|
@@ -430,6 +440,14 @@ private:
|
|
|
430
440
|
return bridging::callFromJs<bool>(
|
|
431
441
|
rt, &T::useRawPropsJsiValue, jsInvoker_, instance_);
|
|
432
442
|
}
|
|
443
|
+
bool useShadowNodeStateOnClone(jsi::Runtime &rt) override {
|
|
444
|
+
static_assert(
|
|
445
|
+
bridging::getParameterCount(&T::useShadowNodeStateOnClone) == 1,
|
|
446
|
+
"Expected useShadowNodeStateOnClone(...) to have 1 parameters");
|
|
447
|
+
|
|
448
|
+
return bridging::callFromJs<bool>(
|
|
449
|
+
rt, &T::useShadowNodeStateOnClone, jsInvoker_, instance_);
|
|
450
|
+
}
|
|
433
451
|
bool useTurboModuleInterop(jsi::Runtime &rt) override {
|
|
434
452
|
static_assert(
|
|
435
453
|
bridging::getParameterCount(&T::useTurboModuleInterop) == 1,
|
|
@@ -698,6 +698,11 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
- (void)_restoreTextSelection
|
|
701
|
+
{
|
|
702
|
+
[self _restoreTextSelectionAndIgnoreCaretChange:NO];
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
- (void)_restoreTextSelectionAndIgnoreCaretChange:(BOOL)ignore
|
|
701
706
|
{
|
|
702
707
|
const auto &selection = static_cast<const TextInputProps &>(*_props).selection;
|
|
703
708
|
if (!selection.has_value()) {
|
|
@@ -707,6 +712,9 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
|
|
707
712
|
offset:selection->start];
|
|
708
713
|
auto end = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument offset:selection->end];
|
|
709
714
|
auto range = [_backedTextInputView textRangeFromPosition:start toPosition:end];
|
|
715
|
+
if (ignore && range.empty) {
|
|
716
|
+
return;
|
|
717
|
+
}
|
|
710
718
|
[_backedTextInputView setSelectedTextRange:range notifyDelegate:YES];
|
|
711
719
|
}
|
|
712
720
|
|
|
@@ -721,19 +729,20 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
|
|
721
729
|
// Updating the UITextView attributedText, for example changing the lineHeight, the color or adding
|
|
722
730
|
// a new paragraph with \n, causes the cursor to move to the end of the Text and scroll.
|
|
723
731
|
// This is fixed by restoring the cursor position and scrolling to that position (iOS issue 652653).
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
732
|
+
// Maintaining a cursor position relative to the end of the old text.
|
|
733
|
+
NSInteger offsetStart = [_backedTextInputView offsetFromPosition:_backedTextInputView.beginningOfDocument
|
|
734
|
+
toPosition:selectedRange.start];
|
|
735
|
+
NSInteger offsetFromEnd = oldTextLength - offsetStart;
|
|
736
|
+
NSInteger newOffset = attributedString.string.length - offsetFromEnd;
|
|
737
|
+
UITextPosition *position = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument
|
|
738
|
+
offset:newOffset];
|
|
739
|
+
[_backedTextInputView setSelectedTextRange:[_backedTextInputView textRangeFromPosition:position toPosition:position]
|
|
740
|
+
notifyDelegate:YES];
|
|
741
|
+
[_backedTextInputView scrollRangeToVisible:NSMakeRange(offsetStart, 0)];
|
|
742
|
+
|
|
743
|
+
// A zero-length selection range can cause the caret position to change on iOS,
|
|
744
|
+
// and we have already updated the caret position, so we can safely ignore caret changing in this place.
|
|
745
|
+
[self _restoreTextSelectionAndIgnoreCaretChange:YES];
|
|
737
746
|
[self _updateTypingAttributes];
|
|
738
747
|
_lastStringStateWasUpdatedWith = attributedString;
|
|
739
748
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/devsupport/ReleaseDevSupportManager.kt
CHANGED
|
@@ -11,6 +11,7 @@ import android.app.Activity
|
|
|
11
11
|
import android.util.Pair
|
|
12
12
|
import android.view.View
|
|
13
13
|
import com.facebook.react.bridge.DefaultJSExceptionHandler
|
|
14
|
+
import com.facebook.react.bridge.JSExceptionHandler
|
|
14
15
|
import com.facebook.react.bridge.ReactContext
|
|
15
16
|
import com.facebook.react.bridge.ReadableArray
|
|
16
17
|
import com.facebook.react.common.SurfaceDelegate
|
|
@@ -34,7 +35,7 @@ import java.io.File
|
|
|
34
35
|
*/
|
|
35
36
|
public open class ReleaseDevSupportManager : DevSupportManager {
|
|
36
37
|
|
|
37
|
-
private val defaultJSExceptionHandler:
|
|
38
|
+
private val defaultJSExceptionHandler: JSExceptionHandler = DefaultJSExceptionHandler()
|
|
38
39
|
|
|
39
40
|
public override fun showNewJavaError(message: String?, e: Throwable?): Unit = Unit
|
|
40
41
|
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<b263bdcbc1258f7d5c56e69732ba9076>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -238,6 +238,12 @@ public object ReactNativeFeatureFlags {
|
|
|
238
238
|
@JvmStatic
|
|
239
239
|
public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = accessor.traceTurboModulePromiseRejectionsOnAndroid()
|
|
240
240
|
|
|
241
|
+
/**
|
|
242
|
+
* When enabled, runtime shadow node references will be updated during the commit. This allows running RSNRU from any thread without corrupting the renderer state.
|
|
243
|
+
*/
|
|
244
|
+
@JvmStatic
|
|
245
|
+
public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = accessor.updateRuntimeShadowNodeReferencesOnCommit()
|
|
246
|
+
|
|
241
247
|
/**
|
|
242
248
|
* In Bridgeless mode, use the always available javascript error reporting pipeline.
|
|
243
249
|
*/
|
|
@@ -274,6 +280,12 @@ public object ReactNativeFeatureFlags {
|
|
|
274
280
|
@JvmStatic
|
|
275
281
|
public fun useRawPropsJsiValue(): Boolean = accessor.useRawPropsJsiValue()
|
|
276
282
|
|
|
283
|
+
/**
|
|
284
|
+
* 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.
|
|
285
|
+
*/
|
|
286
|
+
@JvmStatic
|
|
287
|
+
public fun useShadowNodeStateOnClone(): Boolean = accessor.useShadowNodeStateOnClone()
|
|
288
|
+
|
|
277
289
|
/**
|
|
278
290
|
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
|
|
279
291
|
*/
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<0496ecf3d1e5d8a2e6d4d594aca806d0>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -55,12 +55,14 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
55
55
|
private var removeTurboModuleManagerDelegateMutexCache: Boolean? = null
|
|
56
56
|
private var throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOSCache: Boolean? = null
|
|
57
57
|
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
|
58
|
+
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
|
58
59
|
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
|
|
59
60
|
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
|
|
60
61
|
private var useFabricInteropCache: Boolean? = null
|
|
61
62
|
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
|
62
63
|
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
|
63
64
|
private var useRawPropsJsiValueCache: Boolean? = null
|
|
65
|
+
private var useShadowNodeStateOnCloneCache: Boolean? = null
|
|
64
66
|
private var useTurboModuleInteropCache: Boolean? = null
|
|
65
67
|
private var useTurboModulesCache: Boolean? = null
|
|
66
68
|
|
|
@@ -379,6 +381,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
379
381
|
return cached
|
|
380
382
|
}
|
|
381
383
|
|
|
384
|
+
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean {
|
|
385
|
+
var cached = updateRuntimeShadowNodeReferencesOnCommitCache
|
|
386
|
+
if (cached == null) {
|
|
387
|
+
cached = ReactNativeFeatureFlagsCxxInterop.updateRuntimeShadowNodeReferencesOnCommit()
|
|
388
|
+
updateRuntimeShadowNodeReferencesOnCommitCache = cached
|
|
389
|
+
}
|
|
390
|
+
return cached
|
|
391
|
+
}
|
|
392
|
+
|
|
382
393
|
override fun useAlwaysAvailableJSErrorHandling(): Boolean {
|
|
383
394
|
var cached = useAlwaysAvailableJSErrorHandlingCache
|
|
384
395
|
if (cached == null) {
|
|
@@ -433,6 +444,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
433
444
|
return cached
|
|
434
445
|
}
|
|
435
446
|
|
|
447
|
+
override fun useShadowNodeStateOnClone(): Boolean {
|
|
448
|
+
var cached = useShadowNodeStateOnCloneCache
|
|
449
|
+
if (cached == null) {
|
|
450
|
+
cached = ReactNativeFeatureFlagsCxxInterop.useShadowNodeStateOnClone()
|
|
451
|
+
useShadowNodeStateOnCloneCache = cached
|
|
452
|
+
}
|
|
453
|
+
return cached
|
|
454
|
+
}
|
|
455
|
+
|
|
436
456
|
override fun useTurboModuleInterop(): Boolean {
|
|
437
457
|
var cached = useTurboModuleInteropCache
|
|
438
458
|
if (cached == null) {
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<c4f3b0cee8b9b4b9cebb589801e1dd15>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -98,6 +98,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
|
|
98
98
|
|
|
99
99
|
@DoNotStrip @JvmStatic public external fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
|
|
100
100
|
|
|
101
|
+
@DoNotStrip @JvmStatic public external fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
|
|
102
|
+
|
|
101
103
|
@DoNotStrip @JvmStatic public external fun useAlwaysAvailableJSErrorHandling(): Boolean
|
|
102
104
|
|
|
103
105
|
@DoNotStrip @JvmStatic public external fun useEditTextStockAndroidFocusBehavior(): Boolean
|
|
@@ -110,6 +112,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
|
|
110
112
|
|
|
111
113
|
@DoNotStrip @JvmStatic public external fun useRawPropsJsiValue(): Boolean
|
|
112
114
|
|
|
115
|
+
@DoNotStrip @JvmStatic public external fun useShadowNodeStateOnClone(): Boolean
|
|
116
|
+
|
|
113
117
|
@DoNotStrip @JvmStatic public external fun useTurboModuleInterop(): Boolean
|
|
114
118
|
|
|
115
119
|
@DoNotStrip @JvmStatic public external fun useTurboModules(): Boolean
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<a8900217ae0385947b619c8fa0834942>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -93,6 +93,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
93
93
|
|
|
94
94
|
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = false
|
|
95
95
|
|
|
96
|
+
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = false
|
|
97
|
+
|
|
96
98
|
override fun useAlwaysAvailableJSErrorHandling(): Boolean = false
|
|
97
99
|
|
|
98
100
|
override fun useEditTextStockAndroidFocusBehavior(): Boolean = true
|
|
@@ -105,6 +107,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
105
107
|
|
|
106
108
|
override fun useRawPropsJsiValue(): Boolean = false
|
|
107
109
|
|
|
110
|
+
override fun useShadowNodeStateOnClone(): Boolean = false
|
|
111
|
+
|
|
108
112
|
override fun useTurboModuleInterop(): Boolean = false
|
|
109
113
|
|
|
110
114
|
override fun useTurboModules(): Boolean = false
|
|
@@ -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<<
|
|
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<<
|
|
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
|
|
@@ -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<<
|
|
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<<
|
|
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
|
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
|
|
15
15
|
#define REACT_NATIVE_VERSION_MAJOR 0
|
|
16
16
|
#define REACT_NATIVE_VERSION_MINOR 79
|
|
17
|
-
#define REACT_NATIVE_VERSION_PATCH
|
|
17
|
+
#define REACT_NATIVE_VERSION_PATCH 2
|
|
18
18
|
|
|
19
19
|
namespace facebook::react {
|
|
20
20
|
|
|
21
21
|
constexpr struct {
|
|
22
22
|
int32_t Major = 0;
|
|
23
23
|
int32_t Minor = 79;
|
|
24
|
-
int32_t Patch =
|
|
24
|
+
int32_t Patch = 2;
|
|
25
25
|
std::string_view Prerelease = "";
|
|
26
26
|
} ReactNativeVersion;
|
|
27
27
|
|
|
@@ -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<<
|
|
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<<
|
|
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<<
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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<<
|
|
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*>,
|
|
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<<
|
|
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<<
|
|
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<<
|
|
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<<
|
|
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<<
|
|
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);
|
|
@@ -112,7 +112,9 @@ ShadowNode::ShadowNode(
|
|
|
112
112
|
fragment.children ? fragment.children : sourceShadowNode.children_),
|
|
113
113
|
state_(
|
|
114
114
|
fragment.state ? fragment.state
|
|
115
|
-
:
|
|
115
|
+
: (ReactNativeFeatureFlags::useShadowNodeStateOnClone()
|
|
116
|
+
? sourceShadowNode.state_
|
|
117
|
+
: sourceShadowNode.getMostRecentState())),
|
|
116
118
|
orderIndex_(sourceShadowNode.orderIndex_),
|
|
117
119
|
family_(sourceShadowNode.family_),
|
|
118
120
|
traits_(sourceShadowNode.traits_) {
|
|
@@ -308,20 +310,28 @@ void ShadowNode::setRuntimeShadowNodeReference(
|
|
|
308
310
|
runtimeShadowNodeReference_ = runtimeShadowNodeReference;
|
|
309
311
|
}
|
|
310
312
|
|
|
313
|
+
void ShadowNode::updateRuntimeShadowNodeReference(
|
|
314
|
+
const Shared& destinationShadowNode) const {
|
|
315
|
+
if (auto reference = runtimeShadowNodeReference_.lock()) {
|
|
316
|
+
reference->shadowNode = destinationShadowNode;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
311
320
|
void ShadowNode::transferRuntimeShadowNodeReference(
|
|
312
321
|
const Shared& destinationShadowNode) const {
|
|
313
322
|
destinationShadowNode->runtimeShadowNodeReference_ =
|
|
314
323
|
runtimeShadowNodeReference_;
|
|
315
324
|
|
|
316
|
-
if (
|
|
317
|
-
|
|
325
|
+
if (!ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit()) {
|
|
326
|
+
updateRuntimeShadowNodeReference(destinationShadowNode);
|
|
318
327
|
}
|
|
319
328
|
}
|
|
320
329
|
|
|
321
330
|
void ShadowNode::transferRuntimeShadowNodeReference(
|
|
322
331
|
const Shared& destinationShadowNode,
|
|
323
332
|
const ShadowNodeFragment& fragment) const {
|
|
324
|
-
if (
|
|
333
|
+
if ((ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit() ||
|
|
334
|
+
useRuntimeShadowNodeReferenceUpdateOnThread) &&
|
|
325
335
|
fragment.runtimeShadowNodeReference) {
|
|
326
336
|
transferRuntimeShadowNodeReference(destinationShadowNode);
|
|
327
337
|
}
|
|
@@ -187,6 +187,12 @@ class ShadowNode : public Sealable,
|
|
|
187
187
|
void setRuntimeShadowNodeReference(const std::shared_ptr<ShadowNodeWrapper>&
|
|
188
188
|
runtimeShadowNodeReference) const;
|
|
189
189
|
|
|
190
|
+
/*
|
|
191
|
+
* Update the runtime reference to point to the provided shadow node.
|
|
192
|
+
*/
|
|
193
|
+
void updateRuntimeShadowNodeReference(
|
|
194
|
+
const Shared& destinationShadowNode) const;
|
|
195
|
+
|
|
190
196
|
/*
|
|
191
197
|
* Transfer the runtime reference to this `ShadowNode` to a new instance,
|
|
192
198
|
* updating the reference to point to the new `ShadowNode` referencing it.
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
#include "updateMountedFlag.h"
|
|
9
9
|
|
|
10
|
+
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
|
11
|
+
|
|
10
12
|
namespace facebook::react {
|
|
11
13
|
void updateMountedFlag(
|
|
12
14
|
const ShadowNode::ListOfShared& oldChildren,
|
|
@@ -47,6 +49,10 @@ void updateMountedFlag(
|
|
|
47
49
|
newChild->setMounted(true);
|
|
48
50
|
oldChild->setMounted(false);
|
|
49
51
|
|
|
52
|
+
if (ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit()) {
|
|
53
|
+
newChild->updateRuntimeShadowNodeReference(newChild);
|
|
54
|
+
}
|
|
55
|
+
|
|
50
56
|
updateMountedFlag(oldChild->getChildren(), newChild->getChildren());
|
|
51
57
|
}
|
|
52
58
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.2",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -108,13 +108,13 @@
|
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
110
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
111
|
-
"@react-native/assets-registry": "0.79.
|
|
112
|
-
"@react-native/codegen": "0.79.
|
|
113
|
-
"@react-native/community-cli-plugin": "0.79.
|
|
114
|
-
"@react-native/gradle-plugin": "0.79.
|
|
115
|
-
"@react-native/js-polyfills": "0.79.
|
|
116
|
-
"@react-native/normalize-colors": "0.79.
|
|
117
|
-
"@react-native/virtualized-lists": "0.79.
|
|
111
|
+
"@react-native/assets-registry": "0.79.2",
|
|
112
|
+
"@react-native/codegen": "0.79.2",
|
|
113
|
+
"@react-native/community-cli-plugin": "0.79.2",
|
|
114
|
+
"@react-native/gradle-plugin": "0.79.2",
|
|
115
|
+
"@react-native/js-polyfills": "0.79.2",
|
|
116
|
+
"@react-native/normalize-colors": "0.79.2",
|
|
117
|
+
"@react-native/virtualized-lists": "0.79.2",
|
|
118
118
|
"abort-controller": "^3.0.0",
|
|
119
119
|
"anser": "^1.4.9",
|
|
120
120
|
"ansi-regex": "^5.0.0",
|
|
@@ -1081,19 +1081,19 @@ function execute(projectRoot, targetPlatform, baseOutputPath, source) {
|
|
|
1081
1081
|
platform,
|
|
1082
1082
|
);
|
|
1083
1083
|
|
|
1084
|
-
if (source === 'app') {
|
|
1085
|
-
// These components are only required by apps, not by libraries
|
|
1084
|
+
if (source === 'app' && platform !== 'android') {
|
|
1085
|
+
// These components are only required by apps, not by libraries. They are also Apple specific.
|
|
1086
1086
|
generateRCTThirdPartyComponents(libraries, outputPath);
|
|
1087
1087
|
generateRCTModuleProviders(projectRoot, pkgJson, libraries, outputPath);
|
|
1088
1088
|
generateCustomURLHandlers(libraries, outputPath);
|
|
1089
1089
|
generateAppDependencyProvider(outputPath);
|
|
1090
|
+
generateReactCodegenPodspec(
|
|
1091
|
+
projectRoot,
|
|
1092
|
+
pkgJson,
|
|
1093
|
+
outputPath,
|
|
1094
|
+
baseOutputPath,
|
|
1095
|
+
);
|
|
1090
1096
|
}
|
|
1091
|
-
generateReactCodegenPodspec(
|
|
1092
|
-
projectRoot,
|
|
1093
|
-
pkgJson,
|
|
1094
|
-
outputPath,
|
|
1095
|
-
baseOutputPath,
|
|
1096
|
-
);
|
|
1097
1097
|
|
|
1098
1098
|
cleanupEmptyFilesAndFolders(outputPath);
|
|
1099
1099
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<5b1d3ba6712de7a927eeeb8602ee2a8f>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -84,12 +84,14 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
84
84
|
removeTurboModuleManagerDelegateMutex: Getter<boolean>,
|
|
85
85
|
throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS: Getter<boolean>,
|
|
86
86
|
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
|
87
|
+
updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
|
|
87
88
|
useAlwaysAvailableJSErrorHandling: Getter<boolean>,
|
|
88
89
|
useEditTextStockAndroidFocusBehavior: Getter<boolean>,
|
|
89
90
|
useFabricInterop: Getter<boolean>,
|
|
90
91
|
useNativeViewConfigsInBridgelessMode: Getter<boolean>,
|
|
91
92
|
useOptimizedEventBatchingOnAndroid: Getter<boolean>,
|
|
92
93
|
useRawPropsJsiValue: Getter<boolean>,
|
|
94
|
+
useShadowNodeStateOnClone: Getter<boolean>,
|
|
93
95
|
useTurboModuleInterop: Getter<boolean>,
|
|
94
96
|
useTurboModules: Getter<boolean>,
|
|
95
97
|
}>;
|
|
@@ -313,6 +315,10 @@ export const throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIO
|
|
|
313
315
|
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
|
|
314
316
|
*/
|
|
315
317
|
export const traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean> = createNativeFlagGetter('traceTurboModulePromiseRejectionsOnAndroid', false);
|
|
318
|
+
/**
|
|
319
|
+
* When enabled, runtime shadow node references will be updated during the commit. This allows running RSNRU from any thread without corrupting the renderer state.
|
|
320
|
+
*/
|
|
321
|
+
export const updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean> = createNativeFlagGetter('updateRuntimeShadowNodeReferencesOnCommit', false);
|
|
316
322
|
/**
|
|
317
323
|
* In Bridgeless mode, use the always available javascript error reporting pipeline.
|
|
318
324
|
*/
|
|
@@ -337,6 +343,10 @@ export const useOptimizedEventBatchingOnAndroid: Getter<boolean> = createNativeF
|
|
|
337
343
|
* Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value
|
|
338
344
|
*/
|
|
339
345
|
export const useRawPropsJsiValue: Getter<boolean> = createNativeFlagGetter('useRawPropsJsiValue', false);
|
|
346
|
+
/**
|
|
347
|
+
* 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.
|
|
348
|
+
*/
|
|
349
|
+
export const useShadowNodeStateOnClone: Getter<boolean> = createNativeFlagGetter('useShadowNodeStateOnClone', false);
|
|
340
350
|
/**
|
|
341
351
|
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
|
|
342
352
|
*/
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<f8da5261357616749d6319190ed0139d>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -59,12 +59,14 @@ export interface Spec extends TurboModule {
|
|
|
59
59
|
+removeTurboModuleManagerDelegateMutex?: () => boolean;
|
|
60
60
|
+throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS?: () => boolean;
|
|
61
61
|
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
|
62
|
+
+updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
|
|
62
63
|
+useAlwaysAvailableJSErrorHandling?: () => boolean;
|
|
63
64
|
+useEditTextStockAndroidFocusBehavior?: () => boolean;
|
|
64
65
|
+useFabricInterop?: () => boolean;
|
|
65
66
|
+useNativeViewConfigsInBridgelessMode?: () => boolean;
|
|
66
67
|
+useOptimizedEventBatchingOnAndroid?: () => boolean;
|
|
67
68
|
+useRawPropsJsiValue?: () => boolean;
|
|
69
|
+
+useShadowNodeStateOnClone?: () => boolean;
|
|
68
70
|
+useTurboModuleInterop?: () => boolean;
|
|
69
71
|
+useTurboModules?: () => boolean;
|
|
70
72
|
}
|