Implement "script.realmCreated" and "script.realmDestroyed" events for worker realms
Categories
(Remote Protocol :: WebDriver BiDi, task, P2)
Tracking
(firefox149 fixed)
| Tracking | Status | |
|---|---|---|
| firefox149 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 4 open bugs, Regressed 1 open bug)
Details
(Whiteboard: [webdriver:m19], [wptsync upstream][webdriver:relnote])
Attachments
(4 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
Bug 1936770 - [wdspec] Additional tests for script.realmCreated/realmDestroyed for dedicated workers
48 bytes,
text/x-phabricator-request
|
Details | Review |
We should emit script.realmCreated events when a worker realm is registered.
This should be handled in a script module in the process layer.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Updated•11 months ago
|
Updated•11 months ago
|
| Assignee | ||
Updated•8 months ago
|
Updated•5 months ago
|
| Assignee | ||
Comment 1•3 months ago
|
||
Updated•3 months ago
|
| Assignee | ||
Comment 2•3 months ago
|
||
| Assignee | ||
Comment 3•3 months ago
|
||
| Assignee | ||
Comment 4•3 months ago
|
||
I don't think it makes sense to keep Bug 1936769 as a separate bug, let's handle both events at the same time and let me summarize a bit the status.
First off, with the events, we don't actually end up creating WorkerRealm instances. This will only happen in actual worker modules / message handlers when we start handling script.evaluate.
Then, to correctly support shared and service workers - which can have more than 1 related context - we need to adapt our logic to match several browsing contexts to a single context descriptor. This is actually spelled out in the spec in the event is enabled algorithm which takes an array of navigables as parameter. In order to enable this, a few event-related APIs are modified to support matching several browsing context ids. A dedicated browser mochitest is added to check this.
However at the moment, we don't have a way to retrieve relevant browsing context ids for shared and service workers. For shared workers, this is blocked on Bug 2014206. For service workers I will need to file a follow up, but if DevTools serves as prior art, the way we addressed it at that time was to also retrieve service worker subscriptions, and based on the controlled url guess which browsing contexts are controlled by it.
Based on this I suggest to align with the current wdspec tests we have:
- check that dedicated workers can be received globally / per context / per user context
- check that shared and service workers can be received globally
On the topic of tests, the wdspec tests currently use while(true){} as shared worker script, which seems to prevent Firefox from destroying the worker on navigation. I'm not sure why, but this doesn't like a webdriver issue and it should not be our main test for this feature.
| Assignee | ||
Comment 5•3 months ago
|
||
| Assignee | ||
Updated•3 months ago
|
Comment 9•3 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/754cf8e1faaf
https://hg.mozilla.org/mozilla-central/rev/f50aea94abd5
https://hg.mozilla.org/mozilla-central/rev/62ab06d5607e
https://hg.mozilla.org/mozilla-central/rev/0e7579a04f41
Updated•2 months ago
|
Description
•