Re: Using microtask checkpoints for resetting the slow script dialog timer

Boris Zbarsky <[email protected]> Thu, 11 Jul 2013 02:04:54 -0400
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
On 7/11/13 1:43 AM, Bobby Holley wrote:
> Ok. Could we make this better by tying it to the 0<->1 transition in
> request depth on the runtime? That should more or less correspond with the
> first cx we push, which should give us a much more reliable answer.

I'm not sure we can; microtasks might need to span execution with no JS 
on the stack.  Olli would know for sure...

> What are the situations where the stack completely unwinds but we don't
> spin the top-level event loop?

For us right now, or in general?

Here's an example: it's not clear to whether a refresh driver tick 
should have one microtask around all the requestAnimationFrame callbacks 
or not.  Right now we do not, but maybe we should.

But more to the point, exactly what constitutes a microtask will be 
specced, and seems to align well with how the slow script dialog should 
work, to me.

-Boris