Skip to content

Commit

Permalink
Fix race condition in Binding::reportMount (facebook#39420)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#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
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Sep 13, 2023
1 parent ef43846 commit eddefec
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 eddefec

Please sign in to comment.