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

Issue 2091023004: Do not use untraced members while notifying ActiveDOMObjects. (Closed)

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

Description

Do not use untraced members while notifying ActiveDOMObjects. Iterating ActiveDOMObjects has long been a source of crashes (~M29). Oilpan should have ameliorated these crashes yet they persist. One possible reason is that the iteration uses untraced members; these do not provide any guarantee that the object is alive. Note that LifecycleObserver::m_observers are weak! This consolidates the snapshot iteration code into one helper function and uses Members while iterating over them. BUG=451132

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -50 lines) Patch
M third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.h View 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp View 1 chunk +32 lines, -50 lines 1 comment Download

Messages

Total messages: 20 (2 generated)
dominicc (has gone to gerrit)
PTAL
4 years, 5 months ago (2016-06-24 05:54:57 UTC) #2
sof
https://codereview.chromium.org/2091023004/diff/1/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp File third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp (right): https://codereview.chromium.org/2091023004/diff/1/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp#newcode43 third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp:43: HeapVector<Member<ContextLifecycleObserver>> snapshotOfObservers; Could you explain why this is needed? ...
4 years, 5 months ago (2016-06-24 05:57:59 UTC) #4
haraken
Pointers in on-stack HeapHashSets are automatically protected by Oilpan's conservative tracing. So this CL should ...
4 years, 5 months ago (2016-06-24 06:11:46 UTC) #5
dominicc (has gone to gerrit)
On 2016/06/24 at 06:11:46, haraken wrote: > Pointers in on-stack HeapHashSets are automatically protected by ...
4 years, 5 months ago (2016-06-24 07:38:07 UTC) #6
haraken
On 2016/06/24 07:38:07, dominicc wrote: > On 2016/06/24 at 06:11:46, haraken wrote: > > Pointers ...
4 years, 5 months ago (2016-06-24 07:39:49 UTC) #7
sof
On 2016/06/24 07:38:07, dominicc wrote: > On 2016/06/24 at 06:11:46, haraken wrote: > > Pointers ...
4 years, 5 months ago (2016-06-24 07:40:00 UTC) #8
dominicc (has gone to gerrit)
On 2016/06/24 at 05:57:59, sigbjornf wrote: > https://codereview.chromium.org/2091023004/diff/1/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp > File third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp (right): > > https://codereview.chromium.org/2091023004/diff/1/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp#newcode43 ...
4 years, 5 months ago (2016-06-24 07:50:23 UTC) #9
dominicc (has gone to gerrit)
On 2016/06/24 at 07:40:00, sigbjornf wrote: > On 2016/06/24 07:38:07, dominicc wrote: > > On ...
4 years, 5 months ago (2016-06-24 07:53:17 UTC) #10
dominicc (has gone to gerrit)
On 2016/06/24 at 07:53:17, dominicc wrote: > On 2016/06/24 at 07:40:00, sigbjornf wrote: > > ...
4 years, 5 months ago (2016-06-24 07:54:04 UTC) #11
sof
On 2016/06/24 07:54:04, dominicc wrote: > On 2016/06/24 at 07:53:17, dominicc wrote: > > On ...
4 years, 5 months ago (2016-06-24 07:55:05 UTC) #12
dominicc (has gone to gerrit)
Why doesn't the comment in UntracedMember about the object needing to be protected while it ...
4 years, 5 months ago (2016-06-24 08:00:46 UTC) #13
dominicc (has gone to gerrit)
On 2016/06/24 at 08:00:46, dominicc wrote: > Why doesn't the comment in UntracedMember about the ...
4 years, 5 months ago (2016-06-24 08:03:31 UTC) #14
sof
On 2016/06/24 08:03:31, dominicc wrote: > On 2016/06/24 at 08:00:46, dominicc wrote: > > Why ...
4 years, 5 months ago (2016-06-24 08:14:26 UTC) #15
sof
On 2016/06/24 07:53:17, dominicc wrote: > On 2016/06/24 at 07:40:00, sigbjornf wrote: > > On ...
4 years, 5 months ago (2016-06-25 17:53:01 UTC) #16
sof
If appropriate, could someone Cc: sigbjornf@ on issue 451132 ? tia.
4 years, 5 months ago (2016-06-25 17:54:50 UTC) #17
haraken
On 2016/06/25 17:54:50, sof wrote: > If appropriate, could someone Cc: sigbjornf@ on issue 451132 ...
4 years, 5 months ago (2016-06-26 00:41:01 UTC) #18
sof
On 2016/06/26 00:41:01, haraken wrote: > On 2016/06/25 17:54:50, sof wrote: > > If appropriate, ...
4 years, 5 months ago (2016-06-26 06:57:19 UTC) #19
sof
4 years, 5 months ago (2016-06-26 18:39:38 UTC) #20
On 2016/06/26 06:57:19, sof wrote:
> On 2016/06/26 00:41:01, haraken wrote:
> > On 2016/06/25 17:54:50, sof wrote:
> > > If appropriate, could someone Cc: sigbjornf@ on issue 451132 ? tia.
> > 
> > CCed.
> 
> Thanks; https://codereview.chromium.org/2094143002/ avoids snapshotting via
> swapping - it might be preferable.

I think it is ready now; context lifecycle observers are better wrt mutation
during iteration than I previously thought.

Powered by Google App Engine
This is Rietveld 408576698