From c6ca14f5dcf201468518a440b0ba27c054c30dde Mon Sep 17 00:00:00 2001 From: QichenZhu <57348009+QichenZhu@users.noreply.github.com> Date: Tue, 19 Nov 2024 11:57:40 +1300 Subject: [PATCH 1/2] Add patch to enable allowRecursiveCommitsWithSynchronousMountOnAndroid feature flag --- ...ts-with-synchronous-mount-on-android.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 patches/react-native+0.75.2+021+allow-recursive-commits-with-synchronous-mount-on-android.patch diff --git a/patches/react-native+0.75.2+021+allow-recursive-commits-with-synchronous-mount-on-android.patch b/patches/react-native+0.75.2+021+allow-recursive-commits-with-synchronous-mount-on-android.patch new file mode 100644 index 000000000000..e3bf56f2e458 --- /dev/null +++ b/patches/react-native+0.75.2+021+allow-recursive-commits-with-synchronous-mount-on-android.patch @@ -0,0 +1,20 @@ +diff --git a/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp b/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +index 280ae46..2f29b9b 100644 +--- a/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp ++++ b/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +@@ -483,8 +483,13 @@ void Binding::schedulerShouldRenderTransactions( + return; + } + +- if (ReactNativeFeatureFlags:: +- allowRecursiveCommitsWithSynchronousMountOnAndroid()) { ++ // if (ReactNativeFeatureFlags:: ++ // allowRecursiveCommitsWithSynchronousMountOnAndroid()) { ++ ++ // Avoid freeze and crash caused by deadlock. ++ // Remove this patch after the feature flag is enabled by default. ++ // See: https://github.com/Expensify/App/issues/52496 ++ if (true) { + std::vector pendingTransactions; + + { From fa8281f23f59dd56ed4c7384bd4c3015c668d71d Mon Sep 17 00:00:00 2001 From: QichenZhu <57348009+QichenZhu@users.noreply.github.com> Date: Wed, 20 Nov 2024 01:14:06 +1300 Subject: [PATCH 2/2] Remove comments --- ...cursive-commits-with-synchronous-mount-on-android.patch | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/patches/react-native+0.75.2+021+allow-recursive-commits-with-synchronous-mount-on-android.patch b/patches/react-native+0.75.2+021+allow-recursive-commits-with-synchronous-mount-on-android.patch index e3bf56f2e458..95c3b08dc433 100644 --- a/patches/react-native+0.75.2+021+allow-recursive-commits-with-synchronous-mount-on-android.patch +++ b/patches/react-native+0.75.2+021+allow-recursive-commits-with-synchronous-mount-on-android.patch @@ -1,16 +1,13 @@ diff --git a/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp b/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp -index 280ae46..2f29b9b 100644 +index 280ae46..572fb3d 100644 --- a/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +++ b/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp -@@ -483,8 +483,13 @@ void Binding::schedulerShouldRenderTransactions( +@@ -483,8 +483,10 @@ void Binding::schedulerShouldRenderTransactions( return; } - if (ReactNativeFeatureFlags:: - allowRecursiveCommitsWithSynchronousMountOnAndroid()) { -+ // if (ReactNativeFeatureFlags:: -+ // allowRecursiveCommitsWithSynchronousMountOnAndroid()) { -+ + // Avoid freeze and crash caused by deadlock. + // Remove this patch after the feature flag is enabled by default. + // See: https://github.com/Expensify/App/issues/52496