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

Issue 1024543004: Disallow adding ContextLifecycleObservers during iteration. (Closed)

Created:
5 years, 9 months ago by sof
Modified:
5 years, 9 months ago
Reviewers:
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

Disallow adding ContextLifecycleObservers during iteration. The implementation of ContextLifecycleNotifier disallows the addition of ActiveDOMObjects while delivering its notifications, by way of a RELEASE_ASSERT(). This prevents ending up in inconsistent states where (e.g.) instructing the ActiveDOMObjects to stop would lead to the creation of new, but running, ActiveDOMObjects. Extend this restriction to encompass all ContextLifecycleObservers; none may be added while iterating over the registered ActiveDOMObjects. This allows us to simplify the underlying implementation somewhat. R=haraken BUG=462949 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192377

Patch Set 1 #

Total comments: 3

Patch Set 2 : tidier LifecycleObserver ctor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -234 lines) Patch
M Source/core/core.gypi View 5 chunks +0 lines, -5 lines 0 comments Download
M Source/core/dom/ContextLifecycleNotifier.h View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/dom/ContextLifecycleNotifier.cpp View 3 chunks +3 lines, -10 lines 0 comments Download
M Source/core/dom/ContextLifecycleObserver.h View 1 chunk +5 lines, -1 line 0 comments Download
D Source/core/dom/ContextLifecycleObserver.cpp View 1 chunk +0 lines, -41 lines 0 comments Download
M Source/core/dom/DocumentLifecycleObserver.h View 1 chunk +4 lines, -1 line 0 comments Download
D Source/core/dom/DocumentLifecycleObserver.cpp View 1 chunk +0 lines, -40 lines 0 comments Download
M Source/core/frame/DOMWindowLifecycleObserver.h View 1 chunk +4 lines, -1 line 0 comments Download
D Source/core/frame/DOMWindowLifecycleObserver.cpp View 1 chunk +0 lines, -40 lines 0 comments Download
M Source/core/frame/FrameDestructionObserver.h View 2 chunks +5 lines, -2 lines 0 comments Download
D Source/core/frame/FrameDestructionObserver.cpp View 1 chunk +0 lines, -43 lines 0 comments Download
M Source/core/page/PageLifecycleObserver.h View 1 chunk +5 lines, -1 line 0 comments Download
D Source/core/page/PageLifecycleObserver.cpp View 1 chunk +0 lines, -37 lines 0 comments Download
M Source/platform/LifecycleContextTest.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M Source/platform/LifecycleNotifier.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/platform/LifecycleObserver.h View 1 2 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
sof
please take a look. Had another look at the need for ContextLifecycleNotifier::addObserver(), and I think ...
5 years, 9 months ago (2015-03-23 14:23:33 UTC) #2
haraken
LGTM https://codereview.chromium.org/1024543004/diff/1/Source/platform/LifecycleNotifier.h File Source/platform/LifecycleNotifier.h (right): https://codereview.chromium.org/1024543004/diff/1/Source/platform/LifecycleNotifier.h#newcode72 Source/platform/LifecycleNotifier.h:72: IterationType m_iterating; We can probably change this to ...
5 years, 9 months ago (2015-03-23 14:30:43 UTC) #3
sof
https://codereview.chromium.org/1024543004/diff/1/Source/platform/LifecycleObserver.h File Source/platform/LifecycleObserver.h (right): https://codereview.chromium.org/1024543004/diff/1/Source/platform/LifecycleObserver.h#newcode40 Source/platform/LifecycleObserver.h:40: LifecycleObserver(Context* context) On 2015/03/23 14:30:43, haraken wrote: > > ...
5 years, 9 months ago (2015-03-23 15:06:29 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1024543004/20001
5 years, 9 months ago (2015-03-23 16:39:26 UTC) #7
commit-bot: I haz the power
5 years, 9 months ago (2015-03-23 18:11:21 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192377

Powered by Google App Engine
This is Rietveld 408576698