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

Skip to content
Commit 695d5286 authored by Robert Carr's avatar Robert Carr
Browse files

Ensure onHandleDestroyed drops reference before releasing lock.

onHandleDestroyed copies the layer pointer and references it in
mLayersPendingRemoval, so that the final reference will be dropped
from the main thread. However the current implementation is flawed.
It is possible for the main thread to process mLayersPendingRemoval
after we release the lock, but BEFORE we finish executing the
~LayerCleaner destructor. This would mean the last reference would
again be LayerCleaner::mLayer and we would incorrectly run the d'tor
on the main thread. Scheduling priority boosts to the main thread
make this more likely than it may seem.

Test: Boots. Existing tests pass.
Change-Id: Ife247b530b67907b28b4f29f6766c2056fe49bfa
parent b67331d6
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