diff options
author | dan <dan.abramov@gmail.com> | 2024-06-08 09:55:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-08 01:55:57 -0700 |
commit | 01b7a94a7eb95e9cf74fdcfe9cc350e62d0f7be2 (patch) | |
tree | e661275657701c04e7194ad89900c8e860fe562e /patches | |
parent | a2d1cf68b9cf6b2d935439e522c838359a94a9a4 (diff) | |
download | voidsky-01b7a94a7eb95e9cf74fdcfe9cc350e62d0f7be2.tar.zst |
Patch to work around a crash in RN internals (#4426)
Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/react-native+0.74.1.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/patches/react-native+0.74.1.patch b/patches/react-native+0.74.1.patch index db8b7da2d..5d2900a73 100644 --- a/patches/react-native+0.74.1.patch +++ b/patches/react-native+0.74.1.patch @@ -67,3 +67,19 @@ index b09e653..4c32b31 100644 +} + @end +diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.java +index 5f5e1ab..aac00b6 100644 +--- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.java ++++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.java +@@ -99,8 +99,9 @@ public class JavaTimerManager { + } + + // If the JS thread is busy for multiple frames we cancel any other pending runnable. +- if (mCurrentIdleCallbackRunnable != null) { +- mCurrentIdleCallbackRunnable.cancel(); ++ IdleCallbackRunnable currentRunnable = mCurrentIdleCallbackRunnable; ++ if (currentRunnable != null) { ++ currentRunnable.cancel(); + } + + mCurrentIdleCallbackRunnable = new IdleCallbackRunnable(frameTimeNanos); |