Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Issue 1214963002: Oilpan: support observer retirement during lifetime notifications. (Closed)

Created:
5 years, 5 months ago by sof
Modified:
5 years, 5 months ago
Reviewers:
oilpan-reviews, haraken
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, sof, eae+blinkwatch, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -2 lines) Patch
M Source/core/dom/DocumentLifecycleNotifier.cpp View 1 chunk +25 lines, -2 lines 0 comments Download
M Source/core/frame/DOMWindowLifecycleNotifier.cpp View 1 chunk +42 lines, -0 lines 0 comments Download
M Source/core/frame/LocalFrameLifecycleNotifier.cpp View 1 chunk +14 lines, -0 lines 0 comments Download
M Source/core/page/PageLifecycleNotifier.cpp View 1 chunk +28 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
sof
please take a look. an interaction i hadn't thought of or run into before..
5 years, 5 months ago (2015-06-29 09:38:42 UTC) #2
sof
Ran into this issue when enabling lazy sweeping for non-Oilpan (the only thing afaict), but ...
5 years, 5 months ago (2015-06-29 12:06:30 UTC) #3
haraken
Thanks for looking into the issue, LGTM. Not related to this issue, but another suggestion ...
5 years, 5 months ago (2015-06-29 14:13:12 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1214963002/1
5 years, 5 months ago (2015-06-29 14:48:00 UTC) #6
commit-bot: I haz the power
5 years, 5 months ago (2015-06-29 14:51:41 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197990

Powered by Google App Engine
This is Rietveld 408576698