mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Don't crash on reload (#53590)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53590 Changelog: [General][Fixed] ReactCxxPlatform] Don't crash on reload Reviewed By: shwanton Differential Revision: D81626640 fbshipit-source-id: 31016c67a1913a8be8578848e756e0447b802484
This commit is contained in:
committed by
Facebook GitHub Bot
parent
43ad2c0abb
commit
5d65794ee4
@@ -533,7 +533,9 @@ std::unordered_set<SurfaceId> ReactHost::getRunningSurfaces() const noexcept {
|
||||
|
||||
void ReactHost::runOnScheduler(
|
||||
std::function<void(Scheduler& scheduler)>&& task) const {
|
||||
task(*scheduler_);
|
||||
if (!isReloadingReactInstance_) {
|
||||
task(*scheduler_);
|
||||
}
|
||||
}
|
||||
|
||||
void ReactHost::runOnRuntimeScheduler(
|
||||
|
||||
Reference in New Issue
Block a user