mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46735 We had some crash on Android where we call [`callFunctionOnModule`](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp#L258) when the `bufferedRuntimeExecutor_` might not be initialized. This can happen when navigating away from RN surface and quickly navigate to another one or across refreshes. There could be a scheduled JS function from the previous surface/instance that might try to call a native module while the new instance is being created. This change prevent the crash and replace it with a soft crash, that should show a RedBox on the screen. ## Changelog [Internal] - Throw JS exception when calling a method if buffereRuntimeExecutor is not initialized ## Facebook Have a look at T201983945 that generated the crash report Reviewed By: cortinico Differential Revision: D63638633 fbshipit-source-id: ba331f5173963265232d0810c2d12895cea3d528