mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix race condition in Binding::reportMount (#39420)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39420 changelog: [internal] The intent of the code is to retain shared_ptr<Scheduler> but by using a reference, it didn't do that. Leading to a race condition. bypass-github-export-checks Reviewed By: rubennorte Differential Revision: D49227147 fbshipit-source-id: 1a548f7174eacb95c14c89f72b51ccd263c5ab01
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ef438464fa
commit
eddefec5f8
@@ -98,7 +98,7 @@ void Binding::driveCxxAnimations() {
|
||||
}
|
||||
|
||||
void Binding::reportMount(SurfaceId surfaceId) {
|
||||
const auto& scheduler = getScheduler();
|
||||
auto scheduler = getScheduler();
|
||||
if (!scheduler) {
|
||||
LOG(ERROR) << "Binding::reportMount: scheduler disappeared";
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user