DescriptionOilpan: support observer retirement during lifetime notifications.
While transitioning Blink to Oilpan, there will be LifecycleNotifier<>s
not on the Oilpan heap, but with some of their LifecycleObserver<>s being
on the heap.
Should a GC strike while such a notifier iterates over its observer set,
dead observers may remove themselves (eagerly) while being finalized
during that GC. This will mutate the notifier set, which isn't currently
assumed nor supported.
There's no need to support this when fully transitioned, Oilpan will
handle GCs across such iterations gracefully, but in the meantime we will
have to support this by snapshot'ing the observer set and explicitly
checking for liveness. Like already done over ContextLifecycleNotifier,
where such dynamic unregistrations are supported.
Notice that this issue isn't tied to lazy sweeping; indeed, lazy sweeping
without eager finalization of lifecycle observers will potentially make this
bug rarer.
R=haraken
BUG=480837
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197990
Patch Set 1 #
Messages
Total messages: 7 (2 generated)
|