Skip to content

Commit 30638ca

Browse files
peachbitsclaude
andcommitted
Restore ShadowTree commit-exhaustion protection
React Native 0.85.3 upstreamed the equivalent of our old react-native+0.79.2.patch — ShadowTree::commit() now caps optimistic retries at MAX_COMMIT_ATTEMPTS_BEFORE_LOCKING and falls back to an exclusive recursive lock (ReactCommon/react/renderer/mounting/ShadowTree.cpp) — but only behind the preventShadowTreeCommitExhaustion feature flag, which defaults to false. Enable the flag with a 1-line patch so the RN upgrade doesn't silently drop the crash protection. Delete this patch when upstream flips the default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0925738 commit 30638ca

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

patches/react-native+0.85.3.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/node_modules/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/node_modules/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h
2+
index 8146298..4fd688b 100644
3+
--- a/node_modules/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h
4+
+++ b/node_modules/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h
5+
@@ -300,7 +300,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
6+
}
7+
8+
bool preventShadowTreeCommitExhaustion() override {
9+
- return false;
10+
+ return true;
11+
}
12+
13+
bool redBoxV2Android() override {

0 commit comments

Comments
 (0)