mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46116 If your app raises an early js exception, and you cold start it, often you'll see this error: ``` SurfaceRegistryBinding::startSurface failed. Global was not installed. ``` {F1807125099} The reason why is because two different threads race to redbox: * The nativemodule thread: the early js error (reported [here](https://fburl.com/code/vcrqzsdp)) * The javascript thread: the SurfaceRegistryBinding error (a subsequent native -> js call) After this diff, the early js error will **not jump onto the nativemodule thread** to report this error. This ensures that we "always" (to the best of my knowledge) see the early js error first. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D61339213 fbshipit-source-id: f1b9ab30150b87377817c2fd93ca349c406db48b