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

Issue 2109553002: Allow lazy removal of (context) lifecycle observers while stopping. (Closed)

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

Description

Allow lazy removal of (context) lifecycle observers while stopping. r402141 imposed the restriction on ContextLifecycleObservers behavior during stop() notifications of no longer being allowed to remove observers while handling stop(). That constraint enables iteration to be handled without allocating a snapshot of the observer set. That restriction proves too constraining for media elements indirectly holding onto AssociatedURLLoader objects while being stopped (see associated bug for info.) Consequently, we allow observer removals while keeping observer set iteration safe & allocation-free -- removals are recorded while iterating, and removed in one go afterwards. This is only done for notifyStoppingActiveDOMObjects(), as the other notifications over context lifecycle observers do not require this flexibility. R= BUG=623755 Committed: https://crrev.com/651bd9f00d9138c0118e9aa923b389d51bb33763 Cr-Commit-Position: refs/heads/master@{#402445}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -7 lines) Patch
M third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp View 3 chunks +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/LifecycleNotifier.h View 2 chunks +25 lines, -4 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
sof
please take a look.
4 years, 5 months ago (2016-06-28 09:42:42 UTC) #3
haraken
LGTM (though I really want to remove code that removes observers while iterating).
4 years, 5 months ago (2016-06-28 10:05:55 UTC) #4
sof
On 2016/06/28 10:05:55, haraken wrote: > LGTM (though I really want to remove code that ...
4 years, 5 months ago (2016-06-28 10:39:32 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2109553002/1
4 years, 5 months ago (2016-06-28 11:16:01 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-06-28 12:19:48 UTC) #9
commit-bot: I haz the power
4 years, 5 months ago (2016-06-28 12:21:27 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/651bd9f00d9138c0118e9aa923b389d51bb33763
Cr-Commit-Position: refs/heads/master@{#402445}

Powered by Google App Engine
This is Rietveld 408576698