Closed Bug 1805378 Opened 2 years ago Closed 2 years ago

Simplify devtools workers

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(7 files)

This is mostly to followup on these two comments:
https://phabricator.services.mozilla.com/D162964#5386807
Where the console spawn a duplicate instance of parser worker, and the parser worker should be using task instead of invoke function.

This prevents recreating a complex method each time we call WorkerDispatcher.invoke.

As well as its leftover dependencies.

Note that we still have to instantiate a Webconsole dedicated one in case of Browser Console,
which won't have any toolbox offhand.

Because of this, we have to now pass the worker URL via WorkerDispatcher constructor.
Doing this should help then extend WorkerDispatcher instead of manually instantiating it.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

This complexify the existing tests a bit, but will make the management from the Toolbox more obvious.

(Also I forgot to remove the source-map-loader from the list of browser loader module...)

Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/926ce2f2d51f [devtools] Use WorkerDispatcher.task in Parser worker. r=bomsy https://hg.mozilla.org/integration/autoland/rev/9a1e0541748a [devtools] Remove unused getNextStep method from the parser worker. r=bomsy https://hg.mozilla.org/integration/autoland/rev/975bd01106d7 [devtools] Reuse toolbox parser worker from the webconsole. r=bomsy https://hg.mozilla.org/integration/autoland/rev/1bd4fec4b964 [devtools] Convert WorkerDispatcher to ES Class. r=bomsy https://hg.mozilla.org/integration/autoland/rev/bd89280bde1a [devtools] Automatically start the worker on first WorkerDispatcher invoke/task call. r=bomsy https://hg.mozilla.org/integration/autoland/rev/5479ff3a475f [devtools] Make all debugger worker use the same pattern an inherit from WorkerDispatcher. r=bomsy https://hg.mozilla.org/integration/autoland/rev/4dd1ad435728 [devtools] Make the SourceMapLoader be instantiated per toolbox. r=bomsy

Backed out for causing failures in source-map-loader.js.

Flags: needinfo?(poirot.alex)
Blocks: 1806615
Blocks: 1806616
Flags: needinfo?(poirot.alex)
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/689046028162 [devtools] Use WorkerDispatcher.task in Parser worker. r=bomsy https://hg.mozilla.org/integration/autoland/rev/784c086d0975 [devtools] Remove unused getNextStep method from the parser worker. r=bomsy https://hg.mozilla.org/integration/autoland/rev/1fb0d941f15b [devtools] Reuse toolbox parser worker from the webconsole. r=bomsy https://hg.mozilla.org/integration/autoland/rev/af8bee46fcd6 [devtools] Convert WorkerDispatcher to ES Class. r=bomsy https://hg.mozilla.org/integration/autoland/rev/2a0d24f91df3 [devtools] Automatically start the worker on first WorkerDispatcher invoke/task call. r=bomsy,perftest-reviewers,kshampur https://hg.mozilla.org/integration/autoland/rev/f7b7152487d0 [devtools] Make all debugger worker use the same pattern an inherit from WorkerDispatcher. r=bomsy https://hg.mozilla.org/integration/autoland/rev/9272c5d75533 [devtools] Make the SourceMapLoader be instantiated per toolbox. r=bomsy,perftest-reviewers,kshampur
Regressions: 1808200
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: