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

Issue 259503007: Flush microtask before event handlers are invoked (Closed)

Created:
6 years, 8 months ago by Hajime Morrita
Modified:
6 years, 8 months ago
CC:
blink-reviews, Nils Barth (inactive), rwlbuis, chrishtr, arv+blink, jsbell+bindings_chromium.org, eae+blinkwatch, sof, kouhei+bindings_chromium.org, abarth-chromium, ojan, marja+watch_chromium.org, dglazkov+blink, adamk+blink_chromium.org, Nate Chapin, Inactive
Visibility:
Public.

Description

Flush microtask before event handlers are invoked This is needed as we want to see custom elements upgraded in @onload event handler. BUG=366877 TEST=import-custom-element-onload.html R=dominicc@chromium.org, haraken@chromium.org

Patch Set 1 #

Patch Set 2 : Added an expected.txt file. #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -2 lines) Patch
A LayoutTests/fast/html/imports/import-custom-element-onload.html View 1 chunk +29 lines, -0 lines 3 comments Download
A + LayoutTests/fast/html/imports/import-custom-element-onload-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/fast/html/imports/resources/import-custom-element-onload-child.html View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/html/imports/resources/import-custom-element-onload-grandchild.html View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/V8AbstractEventListener.cpp View 2 chunks +3 lines, -0 lines 2 comments Download
M Source/core/dom/Microtask.h View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/dom/Microtask.cpp View 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Hajime Morrita
Dominic: PTAL? This is a spin out from https://codereview.chromium.org/249563003/. Haraken: could you rubberstamp binding/ change ...
6 years, 8 months ago (2014-04-24 22:18:58 UTC) #1
haraken
bindings/ LGTM.
6 years, 8 months ago (2014-04-25 01:55:22 UTC) #2
dominicc (has gone to gerrit)
I think rafaelw should look at this one too. https://codereview.chromium.org/259503007/diff/10001/LayoutTests/fast/html/imports/import-custom-element-onload.html File LayoutTests/fast/html/imports/import-custom-element-onload.html (right): https://codereview.chromium.org/259503007/diff/10001/LayoutTests/fast/html/imports/import-custom-element-onload.html#newcode15 LayoutTests/fast/html/imports/import-custom-element-onload.html:15: ...
6 years, 8 months ago (2014-04-25 02:14:49 UTC) #3
adamk
https://codereview.chromium.org/259503007/diff/10001/Source/bindings/v8/V8AbstractEventListener.cpp File Source/bindings/v8/V8AbstractEventListener.cpp (right): https://codereview.chromium.org/259503007/diff/10001/Source/bindings/v8/V8AbstractEventListener.cpp#newcode113 Source/bindings/v8/V8AbstractEventListener.cpp:113: Microtask::performCheckpoint(isolate); On 2014/04/25 02:14:50, dominicc wrote: > Can you ...
6 years, 8 months ago (2014-04-25 18:23:31 UTC) #4
Hajime Morrita
On 2014/04/25 18:23:31, adamk wrote: > https://codereview.chromium.org/259503007/diff/10001/Source/bindings/v8/V8AbstractEventListener.cpp > File Source/bindings/v8/V8AbstractEventListener.cpp (right): > > https://codereview.chromium.org/259503007/diff/10001/Source/bindings/v8/V8AbstractEventListener.cpp#newcode113 > ...
6 years, 8 months ago (2014-04-25 18:34:26 UTC) #5
blink-reviews
The issue is that creating a delivery step here will affect more than custom elements. ...
6 years, 8 months ago (2014-04-25 19:34:20 UTC) #6
Hajime Morrita
On 2014/04/25 19:34:20, blink-reviews_chromium.org wrote: > The issue is that creating a delivery step here ...
6 years, 8 months ago (2014-04-25 22:34:01 UTC) #7
dominicc (has gone to gerrit)
Is this the WebComponentsLoaded event? We could just look at adding that. Naive question: if ...
6 years, 8 months ago (2014-04-25 23:30:36 UTC) #8
Hajime Morrita
6 years, 8 months ago (2014-04-25 23:49:12 UTC) #9
Message was sent while issue was closed.
On 2014/04/25 23:30:36, dominicc wrote:
> Is this the WebComponentsLoaded event? We could just look at adding that.
> 
Hmm? What do you mean? Are you suggesting to add another event? That is
possible.
However, I hope the "load" event being the catch-all type of event that ensures
everything is ready.
In my intuition, WebComponentsLoaded can be fired earlier than load events, not
later.
This probably should be talked at more appropriate forum though.

> Naive question: if you want to synchronize Custom Element callbacks and
> onload, why don't you specialize the Custom Element Microtask Queue for
> imports and have them notify you when the queue is "exiting" back to the
> parent queue and schedule onload at that (maybe much later) point?

Right. Using microtask queue to notify the end of pending element updgrade
sounds better solution actually.

> On Apr 26, 2014 7:34 AM, <mailto:morrita@chromium.org> wrote:
> 
> >
> > On 2014/04/25 19:34:20, http://blink-reviews_chromium.org wrote:
> >
> >> The issue is that creating a delivery step here will affect more than
> >> custom elements. If you want this case handled, it needs to be a larger
> >> (spec) discussion about when performing the microtask checkpoint takes
> >> place.
> >>
> >
> >
> > Yeah, this is valid concern. As I heard any complaint about this so far,
> > I'd
> > like to let it alone.
> > Thanks for giving your thoughts folks.
> >
> >
> >  On Fri, Apr 25, 2014 at 11:34 AM, <mailto:morrita@chromium.org> wrote:
> >>
> >
> >  > On 2014/04/25 18:23:31, adamk wrote:
> >> >
> >> > https://codereview.chromium.org/259503007/diff/10001/
> >> Source/bindings/v8/
> >> > V8AbstractEventListener.cpp
> >> >
> >> >> File Source/bindings/v8/V8AbstractEventListener.cpp (right):
> >> >>
> >> >
> >> >
> >> > https://codereview.chromium.org/259503007/diff/10001/
> >> Source/bindings/v8/
> >> > V8AbstractEventListener.cpp#newcode113
> >> >
> >> >> Source/bindings/v8/V8AbstractEventListener.cpp:113:
> >> >> Microtask::performCheckpoint(isolate);
> >> >> On 2014/04/25 02:14:50, dominicc wrote:
> >> >> > Can you point to the DOM or HTML spec (...or all specs with event
> >> >>
> >> > listeners?)
> >> >
> >> >> > that says to do this?
> >> >>
> >> >
> >> >  I'm fairly sure this is not specced, and I'm not clear on where this
> >> >>
> >> > requirement
> >> >
> >> >> came from. The attached bug has not details...
> >> >>
> >> >
> >> > The layout test captures the exact issue I hoped to work.
> >> > What I want is that Custom Elements an import are upgraded when onload
> >> of
> >> > the
> >> > import is called.
> >> >
> >> > This doesn't come from production/Polymer but I just thought this should
> >> > work.
> >> > So probably this isn't right fix or even isn't worth fixing.
> >> >
> >> > https://codereview.chromium.org/259503007/
> >> >
> >>
> >
> >  To unsubscribe from this group and stop receiving emails from it, send an
> >>
> > email
> >
> >> to mailto:blink-reviews+unsubscribe@chromium.org.
> >>
> >
> >
> >
> > https://codereview.chromium.org/259503007/
> >
> 
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:blink-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698