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

Issue 1206503003: Oilpan: make custom element microtask dispatching lazy sweep savvy. (Closed)

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

Description

Oilpan: make custom element microtask dispatching lazy sweep savvy. When microtask tasks are dispatched, the objects they work over might be in the process of finalizing. Check before initiating the dispatch. R=haraken BUG=502855 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197646

Patch Set 1 #

Patch Set 2 : eagerly finalize run queue (and weak ptr) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M Source/core/dom/custom/CustomElementMicrotaskRunQueue.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
sof
please take a look. hmm.
5 years, 6 months ago (2015-06-23 09:11:54 UTC) #2
haraken
On 2015/06/23 09:11:54, sof wrote: > please take a look. > > hmm. hmm. Maybe ...
5 years, 6 months ago (2015-06-23 09:21:51 UTC) #3
sof
On 2015/06/23 09:21:51, haraken wrote: > On 2015/06/23 09:11:54, sof wrote: > > please take ...
5 years, 6 months ago (2015-06-23 09:33:46 UTC) #4
haraken
On 2015/06/23 09:33:46, sof wrote: > On 2015/06/23 09:21:51, haraken wrote: > > On 2015/06/23 ...
5 years, 6 months ago (2015-06-23 09:48:10 UTC) #5
sof
On 2015/06/23 09:48:10, haraken wrote: > On 2015/06/23 09:33:46, sof wrote: > > On 2015/06/23 ...
5 years, 6 months ago (2015-06-23 09:50:32 UTC) #6
sof
We can reuse the WeakPtr<> for what it's purpose really is; eagerly clearing it out ...
5 years, 6 months ago (2015-06-23 09:56:45 UTC) #7
haraken
On 2015/06/23 09:56:45, sof wrote: > We can reuse the WeakPtr<> for what it's purpose ...
5 years, 6 months ago (2015-06-23 10:25:11 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1206503003/20001
5 years, 6 months ago (2015-06-23 10:34:11 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/60265)
5 years, 6 months ago (2015-06-23 11:46:25 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1206503003/20001
5 years, 6 months ago (2015-06-23 12:15:08 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=197646
5 years, 6 months ago (2015-06-23 13:16:18 UTC) #15
sof
5 years, 6 months ago (2015-06-23 20:29:41 UTC) #16
Message was sent while issue was closed.
On 2015/06/23 09:21:51, haraken wrote:
> On 2015/06/23 09:11:54, sof wrote:
> > please take a look.
> > 
> > hmm.
> 
> hmm.
> 
> Maybe a better fix would be to add a pre-finalizer (or eager sweeping) to
> CustomElementMicrotaskRunQueue and set a flag (or clear something) so that the
> microtask that may run later doesn't dispatch anything (c.f., see how
> ImageLoader's microtask is handled:
>
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit...).
> 
> There are a couple of places that call Microtask::enqueueTask() and it looks
> like we need take care of those call sites as well...

The two remaining are MutationObserver and CustomElementMicrotaskDispatcher,
both checks out as not vulnerable:

 - MutationObserver dispatches over a set of observers kept alive by a global
set, hence it (the set) and the observers will all remain alive until
dispatched.
 - CustomElementMicrotaskDispatcher (CEMD) is similar, dispatching via a CEMD
singleton which keeps its callback queue objects alive.

Powered by Google App Engine
This is Rietveld 408576698