Skip to content

Commit

Permalink
Disable shadow node reference updates by default (#46961)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #46961

Changelog: [Internal]
Runtime Shadow Node Reference Syncing causes asserts when updating the shadow tree without passing through the JS-thread. This diff disables the feature by default to avoid the asserts encountered on RN Windows.

Reviewed By: sammy-SC

Differential Revision: D64188839

fbshipit-source-id: eb65206662d842f8150f1771c86dc8d190cbc3aa
  • Loading branch information
Nick Lefever authored and facebook-github-bot committed Oct 11, 2024
1 parent c09f824 commit aacd4bb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d44c7d51caea5eaa3074217361959b3a>>
* @generated SignedSource<<9e0db1a47596fec77c29122620b8f633>>
*/

/**
Expand Down Expand Up @@ -115,7 +115,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun useOptimizedEventBatchingOnAndroid(): Boolean = false

override fun useRuntimeShadowNodeReferenceUpdate(): Boolean = true
override fun useRuntimeShadowNodeReferenceUpdate(): Boolean = false

override fun useTurboModuleInterop(): Boolean = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b32553b00b1b1b81d4d0fdc89b05da38>>
* @generated SignedSource<<a88154d1c074b2fdab8704d2b209d204>>
*/

/**
Expand Down Expand Up @@ -212,7 +212,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
}

bool useRuntimeShadowNodeReferenceUpdate() override {
return true;
return false;
}

bool useTurboModuleInterop() override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ const definitions: FeatureFlagDefinitions = {
},
},
useRuntimeShadowNodeReferenceUpdate: {
defaultValue: true,
defaultValue: false,
metadata: {
dateAdded: '2024-06-03',
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<75865f1371182e1ed3bce0f8f367faeb>>
* @generated SignedSource<<1ef57002084a2e38a69b43b7d4d557a9>>
* @flow strict
*/

Expand Down Expand Up @@ -373,7 +373,7 @@ export const useOptimizedEventBatchingOnAndroid: Getter<boolean> = createNativeF
/**
* When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree.
*/
export const useRuntimeShadowNodeReferenceUpdate: Getter<boolean> = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdate', true);
export const useRuntimeShadowNodeReferenceUpdate: Getter<boolean> = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdate', false);
/**
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
*/
Expand Down

0 comments on commit aacd4bb

Please sign in to comment.