Remove unecessary worker descriptor/target attach methods
Categories
(DevTools :: Framework, enhancement)
Tracking
(firefox102 fixed)
Tracking | Status | |
---|---|---|
firefox102 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(2 files)
These two attach method are a relic of the past:
WorkerDescriptorActor.attach
isn't really necessary and could be done right away from the actor's constructor:
https://searchfox.org/mozilla-central/rev/7f729f601c0b738f870ae0ed49098f9268e250f9/devtools/server/actors/descriptors/worker.js#88
While WorkerTargetFront.attach
is still justified until we support server side worker targets for all the toolboxes:
https://searchfox.org/mozilla-central/rev/7f729f601c0b738f870ae0ed49098f9268e250f9/devtools/client/fronts/descriptors/worker.js#66
But in the meantime we might rename it to make it clear this is an hopefully temporary workaround.
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
As for other targets, we can instantiate the ThreadActor right away when creating the target.
There is no need to do that later, only on-demand.
Note that it doesn't mean the thread actor itself will be attached.
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
We can immediately "attach" the descriptor as it gets instantiated.
So that the frontend no longer need to call this before doing anything around the worker.
I also renamed the descriptor front method "attach" method,
in order to better highlight how special it is.
Hopefully we can drop this once the worker targets are created by the server.
i.e. when we enable service side worker targets for the browser toolbox,
which includes supporting service workers.
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eb6a4ba9790d [devtools] Get rid of WorkerTargetActor.attach. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/7c45dfdb5932 [devtools] Get rid of WorkerDescriptorActor.attach. r=nchevobbe,devtools-backward-compat-reviewers
Comment 5•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eb6a4ba9790d
https://hg.mozilla.org/mozilla-central/rev/7c45dfdb5932
Description
•