Preliminary work for worker support in TargetList/Resource API
Categories
(DevTools :: Framework, task)
Tracking
(Fission Milestone:M6c, firefox81 fixed)
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
(Whiteboard: dt-fission-m2-mvp)
Attachments
(4 files)
This bug will contain all the parts that can be done beforedoing the core work of Bug 1633712 (making the tests better, making some object ready for the resource API, …)
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Tracking dt-fission-m2-mvp bugs for Fission Nightly milestone (M6c).
Assignee | ||
Comment 2•5 years ago
|
||
fission_document.html's iframe was on example.com while the top document
is always on example.com as well, so we weren't exercising fission in it.
This patch puts the iframe on example.org, which highlighted some TargetList
test failures that this patch addresses.
Assignee | ||
Comment 3•5 years ago
|
||
Numerous test cases are added to check behaviour of the targetList when workers:
- already exists
- are spawned
- are terminated
in same document or remote iframe.
The test is tagged as fail-if when fission is enabled since we don't get the
workers for remote iframes.
Since the iframe now has a service worker (on example.org), we need to unregister
it in browser_target_list_service_workers_navigation as it's not the expected
service worker.
Depends on D85812
Assignee | ||
Comment 4•5 years ago
|
||
The watchResources
function [1] takes as a first parameter either a watcher
actor or a target actor, that is used to manage the created resources (e.g. the
object actors of console messages). In order to be able to manage actors, it
needs to extend the Pool
class (which is the case for actors).
In the worker cases, things are a bit different, since we create a DevToolServer
which only have a WebConsole and a Thread actor. Those actors usually take a target
actor as a parent, but in the Worker thread we simply have an object implementing
the properties and methods it needs.
This will be this "parent" that we're going to pass to watchResources
, and in
order to be able to do that, it needs to be able to manage actors.
In regard of all this, this patch makes the "parent" a Pool, on which we then
put the existing methods and properties.
We take this opportunity to store the parent in the connections object we have,
in order to be able to retrieve it later (e.g. when the WorkerTargetActor on
the content process main thread will notify the Worker thread about resources
to watch/unwatch).
Depends on D85813
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D85814
Updated•5 years ago
|
Updated•5 years ago
|
Comment 7•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/004fe587a64f
https://hg.mozilla.org/mozilla-central/rev/100544e67bff
https://hg.mozilla.org/mozilla-central/rev/e94bc39e9ab7
https://hg.mozilla.org/mozilla-central/rev/89cad404dde9
Description
•