On 2016-12-02 12:42 PM, Tom Tromey wrote:
>>>>>> "Bill" == Bill McCloskey <wmcclos...@mozilla.com> writes:
> 
> Bill> As part of the Quantum DOM project, we're going to be "labeling" all
> Bill> runnables in the browser to say which document they're operating on.
> 
> I wonder whether this can be used to fix the various "run to completion"
> bugs we've encountered in the debugger.  I don't know if I understand
> the problems there well enough to do them justice, but basically the
> issue is that the debugger needs to delay some runnables but not others,
> and the approach currently used lets some slip through.  This shows up
> in a very confusing way for the user, like some XHR callbacks still
> being invoked while supposedly paused in the debugger.
> 
> The meta bug for the devtools side of this is:
> https://bugzilla.mozilla.org/show_bug.cgi?id=1074448
> It has links to all the scenarios where we've encountered the bad behavior.
> 
> The wish-list fix is:
> https://bugzilla.mozilla.org/show_bug.cgi?id=715376
> aka "implement per-page event queue, to allow timeout 
> grouping/prioritization/etc".
> I wonder specifically if Quantum DOM is going to fix this one.

Once the labeling of runnables is finished, we will know which DocGroup
(or TabGroup if the DocGroup isn't known at runnable dispatch time) a
runnable belongs to.  For the Quantum DOM project purposes we will
probably end up splitting the event queue into one queue per TabGroup.
That way, not running a TabGroup would be as simple as skipping over the
queue belonging to the TabGroup from the main event loop.

With this infrastructure in place, we should be able to "suspend" an
entire TabGroup when a page inside it is being debugged, for example.
Or something similar along those lines, depending on what the exact
needs from the devtools side are.  That way, things such as XHR
callbacks will be runnables waiting in the suspended TabGroup's queue,
which will be processed when the TabGroup is resumed.

(Note that we may also be able to do this at the DocGroup level for
devtools, if that's more appropriate.)

Does this sounds like a useful answer?

Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to