Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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<<f04d7cddd72c435fcce120b71366c81c>>
* @generated SignedSource<<049cc0a1aa5ab53ad2ab11c359f49827>>
*/

/**
Expand Down Expand Up @@ -444,6 +444,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = accessor.updateRuntimeShadowNodeReferencesOnCommit()

/**
* When enabled, runtime shadow node references will be updated during the commit only on the allowed thread.
*/
@JvmStatic
public fun updateRuntimeShadowNodeReferencesOnCommitThread(): Boolean = accessor.updateRuntimeShadowNodeReferencesOnCommitThread()

/**
* In Bridgeless mode, use the always available javascript error reporting pipeline.
*/
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<<9158cc3ba1ea8ea65140b582a02a5112>>
* @generated SignedSource<<6d1fc28e24576c1a63dceaa8c974cc1f>>
*/

/**
Expand Down Expand Up @@ -89,6 +89,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitThreadCache: Boolean? = null
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
private var useFabricInteropCache: Boolean? = null
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
Expand Down Expand Up @@ -721,6 +722,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun updateRuntimeShadowNodeReferencesOnCommitThread(): Boolean {
var cached = updateRuntimeShadowNodeReferencesOnCommitThreadCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.updateRuntimeShadowNodeReferencesOnCommitThread()
updateRuntimeShadowNodeReferencesOnCommitThreadCache = cached
}
return cached
}

override fun useAlwaysAvailableJSErrorHandling(): Boolean {
var cached = useAlwaysAvailableJSErrorHandlingCache
if (cached == null) {
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<<8f93f5e6ce460e2337bbdc51bde69558>>
* @generated SignedSource<<26410c9e406969734991456f635be4af>>
*/

/**
Expand Down Expand Up @@ -166,6 +166,8 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean

@DoNotStrip @JvmStatic public external fun updateRuntimeShadowNodeReferencesOnCommitThread(): Boolean

@DoNotStrip @JvmStatic public external fun useAlwaysAvailableJSErrorHandling(): Boolean

@DoNotStrip @JvmStatic public external fun useFabricInterop(): Boolean
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<<afd4040a9d72ea4af7a20084723506aa>>
* @generated SignedSource<<b088aaa5805b084d234c20bed0dec3ab>>
*/

/**
Expand Down Expand Up @@ -161,6 +161,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = false

override fun updateRuntimeShadowNodeReferencesOnCommitThread(): Boolean = false

override fun useAlwaysAvailableJSErrorHandling(): Boolean = false

override fun useFabricInterop(): Boolean = true
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<<377c50a9a022344cba12a1ad6c23b68d>>
* @generated SignedSource<<ee633c2c40fc07aa6cbb5601dfb36cf6>>
*/

/**
Expand Down Expand Up @@ -93,6 +93,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitThreadCache: Boolean? = null
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
private var useFabricInteropCache: Boolean? = null
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
Expand Down Expand Up @@ -794,6 +795,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

override fun updateRuntimeShadowNodeReferencesOnCommitThread(): Boolean {
var cached = updateRuntimeShadowNodeReferencesOnCommitThreadCache
if (cached == null) {
cached = currentProvider.updateRuntimeShadowNodeReferencesOnCommitThread()
accessedFeatureFlags.add("updateRuntimeShadowNodeReferencesOnCommitThread")
updateRuntimeShadowNodeReferencesOnCommitThreadCache = cached
}
return cached
}

override fun useAlwaysAvailableJSErrorHandling(): Boolean {
var cached = useAlwaysAvailableJSErrorHandlingCache
if (cached == null) {
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<<c14e7e11bfb4404e2e8f94e551e1bb4d>>
* @generated SignedSource<<fa7f50fd466b7cb65b208c0b0aaec704>>
*/

/**
Expand Down Expand Up @@ -161,6 +161,8 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean

@DoNotStrip public fun updateRuntimeShadowNodeReferencesOnCommitThread(): Boolean

@DoNotStrip public fun useAlwaysAvailableJSErrorHandling(): Boolean

@DoNotStrip public fun useFabricInterop(): Boolean
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<<3c268f88d2df4ad8500e29b91f1fecc0>>
* @generated SignedSource<<698b775afb6ad9295c181ea3d12118d3>>
*/

/**
Expand Down Expand Up @@ -453,6 +453,12 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}

bool updateRuntimeShadowNodeReferencesOnCommitThread() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("updateRuntimeShadowNodeReferencesOnCommitThread");
return method(javaProvider_);
}

bool useAlwaysAvailableJSErrorHandling() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useAlwaysAvailableJSErrorHandling");
Expand Down Expand Up @@ -862,6 +868,11 @@ bool JReactNativeFeatureFlagsCxxInterop::updateRuntimeShadowNodeReferencesOnComm
return ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit();
}

bool JReactNativeFeatureFlagsCxxInterop::updateRuntimeShadowNodeReferencesOnCommitThread(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommitThread();
}

bool JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling();
Expand Down Expand Up @@ -1150,6 +1161,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"updateRuntimeShadowNodeReferencesOnCommit",
JReactNativeFeatureFlagsCxxInterop::updateRuntimeShadowNodeReferencesOnCommit),
makeNativeMethod(
"updateRuntimeShadowNodeReferencesOnCommitThread",
JReactNativeFeatureFlagsCxxInterop::updateRuntimeShadowNodeReferencesOnCommitThread),
makeNativeMethod(
"useAlwaysAvailableJSErrorHandling",
JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling),
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<<cd6ac6eb0dff3dc55780c809041b76e4>>
* @generated SignedSource<<7be3a44c6ffc2c9d390f66902ef80d30>>
*/

/**
Expand Down Expand Up @@ -237,6 +237,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool updateRuntimeShadowNodeReferencesOnCommit(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool updateRuntimeShadowNodeReferencesOnCommitThread(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool useAlwaysAvailableJSErrorHandling(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

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<<fbd62713d66b440e7c18498ccd2a7c0b>>
* @generated SignedSource<<88b22330e8486a820eb42b59fb7279e4>>
*/

/**
Expand Down Expand Up @@ -302,6 +302,10 @@ bool ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit() {
return getAccessor().updateRuntimeShadowNodeReferencesOnCommit();
}

bool ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommitThread() {
return getAccessor().updateRuntimeShadowNodeReferencesOnCommitThread();
}

bool ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling() {
return getAccessor().useAlwaysAvailableJSErrorHandling();
}
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<<bdc8ad1004183077c5a459efd6b0c8f6>>
* @generated SignedSource<<af0f34b904e1e555e18f186fb44ca089>>
*/

/**
Expand Down Expand Up @@ -384,6 +384,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool updateRuntimeShadowNodeReferencesOnCommit();

/**
* When enabled, runtime shadow node references will be updated during the commit only on the allowed thread.
*/
RN_EXPORT static bool updateRuntimeShadowNodeReferencesOnCommitThread();

/**
* In Bridgeless mode, use the always available javascript error reporting pipeline.
*/
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<<7abeb70e59a3c4953c501011bd858479>>
* @generated SignedSource<<65ca2267e4bd81dcc21f35bbfc880ba8>>
*/

/**
Expand Down Expand Up @@ -1271,6 +1271,24 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
return flagValue.value();
}

bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommitThread() {
auto flagValue = updateRuntimeShadowNodeReferencesOnCommitThread_.load();

if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(69, "updateRuntimeShadowNodeReferencesOnCommitThread");

flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommitThread();
updateRuntimeShadowNodeReferencesOnCommitThread_ = flagValue;
}

return flagValue.value();
}

bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
auto flagValue = useAlwaysAvailableJSErrorHandling_.load();

Expand All @@ -1280,7 +1298,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(69, "useAlwaysAvailableJSErrorHandling");
markFlagAsAccessed(70, "useAlwaysAvailableJSErrorHandling");

flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
useAlwaysAvailableJSErrorHandling_ = flagValue;
Expand All @@ -1298,7 +1316,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(70, "useFabricInterop");
markFlagAsAccessed(71, "useFabricInterop");

flagValue = currentProvider_->useFabricInterop();
useFabricInterop_ = flagValue;
Expand All @@ -1316,7 +1334,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(71, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(72, "useNativeViewConfigsInBridgelessMode");

flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
Expand All @@ -1334,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::useNestedScrollViewAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(72, "useNestedScrollViewAndroid");
markFlagAsAccessed(73, "useNestedScrollViewAndroid");

flagValue = currentProvider_->useNestedScrollViewAndroid();
useNestedScrollViewAndroid_ = flagValue;
Expand All @@ -1352,7 +1370,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(73, "useSharedAnimatedBackend");
markFlagAsAccessed(74, "useSharedAnimatedBackend");

flagValue = currentProvider_->useSharedAnimatedBackend();
useSharedAnimatedBackend_ = flagValue;
Expand All @@ -1370,7 +1388,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(74, "useTraitHiddenOnAndroid");
markFlagAsAccessed(75, "useTraitHiddenOnAndroid");

flagValue = currentProvider_->useTraitHiddenOnAndroid();
useTraitHiddenOnAndroid_ = flagValue;
Expand All @@ -1388,7 +1406,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(75, "useTurboModuleInterop");
markFlagAsAccessed(76, "useTurboModuleInterop");

flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
Expand All @@ -1406,7 +1424,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(76, "useTurboModules");
markFlagAsAccessed(77, "useTurboModules");

flagValue = currentProvider_->useTurboModules();
useTurboModules_ = flagValue;
Expand All @@ -1424,7 +1442,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(77, "viewCullingOutsetRatio");
markFlagAsAccessed(78, "viewCullingOutsetRatio");

flagValue = currentProvider_->viewCullingOutsetRatio();
viewCullingOutsetRatio_ = flagValue;
Expand All @@ -1442,7 +1460,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(78, "virtualViewPrerenderRatio");
markFlagAsAccessed(79, "virtualViewPrerenderRatio");

flagValue = currentProvider_->virtualViewPrerenderRatio();
virtualViewPrerenderRatio_ = flagValue;
Expand Down
Loading