mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ecd2feeea0
Summary: During React Native teardown, we should stop all React surfaces. Otherwise, the app could crash with this error: ``` 08-06 14:54:08.644 14843 14843 F DEBUG : Abort message: 'xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.cpp:171: function ~Scheduler: assertion failed (surfaceIds.empty() && "Scheduler was destroyed with outstanding Surfaces.")' ``` When can teardown occur? One case: an exception occurs on the NativeModules thread. NOTE: This diff impacts the **new** Bridgeless mode lifecycle methods. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D47926966 fbshipit-source-id: 62be90eb49091773976dfb18db5c2a7c0668c382