Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7584836d authored by Dominik Laskowski's avatar Dominik Laskowski
Browse files

SF: Register layers on first strong reference

In ag/9549429, LayerHistory stores a wp<Layer> on Layer construction, at
which point RefBase::mStrong is not yet 1. Since wp<T>::promote succeeds
in that case, LayerHistory may concurrently create a sp<Layer> with sole
ownership on the main thread while checking for expired weak references,
resulting in premature layer destruction.

Bug: 144218964
Test: None (sporadic crash)
Change-Id: Ia7c89a090920588b216b719fce36c9f64a126e81
parent e00dd195
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment