w3c / requestidlecallback

Cooperative Scheduling of Background Tasks
https://w3c.github.io/requestidlecallback/
Other
50 stars 19 forks source link

Starting of an idle period algorithm should take origin into account #81

Closed rniwa closed 4 years ago

rniwa commented 4 years ago

The event loop processing model states to start an idle period algorithm when there is no task in the event loop's task queues and event loop's micro task queue is empty.

This exposes tasks and micro tasks enqueued in cross origin documents. This is not okay.

@annevk @smaug----

rniwa commented 4 years ago

I guess "none of the browsing contexts have a rendering opportunity" is also not right. It exposes whether any of the cross-origin documents have done something to cause a rendering opportunity to occur.

annevk commented 4 years ago

Are you concerned with cross-origin-but-same-site documents or cross-site documents that ought to run in their own agent cluster likely with their own event loop?

cc @domenic

rniwa commented 4 years ago

Oh, right. I had forgotten about the agent clustering refactoring you had been doing. So event loops are separate between cross-site documents so this should be fine in terms of post Spectre security model.

annevk commented 4 years ago

Theoretically, though there's probably edge cases and a bunch of wording to be improved.