You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split kitchen-sink "dom channel" into finer-grained channels #503
A-content/domInteracting with the DOM from web contentB-interesting-projectRepresents work that is expected to be interesting in some fashionI-refactorNo impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring.I-wrongAn incorrect behaviour is observed.
Gecko suffers from a catch-all event loop that cause spec compatibility issues (such as web-visible things like alert and sync XHR spinning up nested event loops). We can avoid this in Servo by providing multiple channels to the script task that the event loop will prioritize in some fashion when polling for an event to handle. We will also require the ability to freeze individual channels, to enable things like sync XHR blocking page-visible events (similarly, alert should block page-visible changes but not block the user from interacting with the dialog). With separate channels, we can also investigate prioritization of certain types of events over others, such as user input over setTimeout. The easiest selection algorithm to start with is likely round-robin, of course.
Cool. We could implement a channel type that supports priority and blocking in a generic way; that would keep some of the mechanics of this out of the script task core.
Additionally, I think we're going to have to write our networking consumer code to always process events by enqueuing a runnable, otherwise we'll break the illusion that nested event loops are supposed to provide.
A-content/domInteracting with the DOM from web contentB-interesting-projectRepresents work that is expected to be interesting in some fashionI-refactorNo impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring.I-wrongAn incorrect behaviour is observed.
Activity
jdm commentedon Jun 3, 2013
Relevant literature:
https://html.spec.whatwg.org/multipage/webappapis.html#generic-task-sources
https://html.spec.whatwg.org/multipage/webappapis.html#event-loops
https://html.spec.whatwg.org/multipage/webappapis.html#pause
kmcallister commentedon Mar 11, 2014
Cool. We could implement a channel type that supports priority and blocking in a generic way; that would keep some of the mechanics of this out of the script task core.
Merge pull request servo#503 from w3c/jgraham/repo_diet
jdm commentedon Feb 4, 2015
This is an important step to enable synchronous, blocking operations that require nested events loops (sync XHR, alert, etc.) in order for the browser to remain responsive. See https://groups.google.com/forum/#!topic/mozilla.dev.servo/unG9GxZnpcU for more information.
jdm commentedon Feb 4, 2015
Additionally, I think we're going to have to write our networking consumer code to always process events by enqueuing a runnable, otherwise we'll break the illusion that nested event loops are supposed to provide.
jdm commentedon Feb 5, 2015
I envision having the following:
We should add APIs for dispatching events to each of these sources as necessary, rather than have users send messages directly on the Sender object.
nox commentedon Oct 10, 2015
@jdm Ain't that done already?
jdm commentedon Oct 10, 2015
I suppose it is. I'll file a separate issue specifically for HTML5 task sources.