Skip to content

Commit

Permalink
Fix race condition in Binding::reportMount
Browse files Browse the repository at this point in the history
Summary:
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
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Sep 13, 2023
1 parent ef43846 commit ee42620
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ee42620

Please sign in to comment.