Remove unused code from source-map-loader codebase
Categories
(DevTools :: Debugger, task)
Tracking
(firefox109 fixed)
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
getAllGeneratedLocations
isn't used by devtools/debugger:
https://searchfox.org/mozilla-central/search?q=selectSource%28&path=debugger&case=false®exp=false
Also setAssetRootURL
could be removed now that the URL of wasm file is fixed:
https://searchfox.org/mozilla-central/search?q=getAllGeneratedLocations&path=devtools&case=false®exp=false
The usage of WorkerDispatcher is not the most performant.
Ideally we shouldn't use WorkerDispatcher.invoke as it recreate a non trivial method each time we call it. Instead we should be using WorkerDispatcher.task:
https://searchfox.org/mozilla-central/rev/83b86005c6913c2062419efb8aabdf2e683aa47f/devtools/client/shared/worker-utils.js#35-74
The createConsumer module looks useless now.
https://searchfox.org/mozilla-central/source/devtools/client/shared/source-map-loader/utils/createConsumer.js
While I'm doing some cleanup, some jsdoc may be helpful here and there.
Assignee | ||
Comment 1•2 years ago
|
||
Instead we could always load the wasm file when the modules are loaded.
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
WorkerDispatcher.invoke will instantiate a new "Task" method on each call.
Ideally, we should only use WorkerDispatch.task(), unless the related method is called once.
Assignee | ||
Comment 4•2 years ago
|
||
Assignee | ||
Comment 5•2 years ago
|
||
Comment 7•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fc0821b24947
https://hg.mozilla.org/mozilla-central/rev/5fd0a8755149
https://hg.mozilla.org/mozilla-central/rev/f4404985a73f
https://hg.mozilla.org/mozilla-central/rev/8f14e58a69ef
https://hg.mozilla.org/mozilla-central/rev/4da1d585bdd4
Description
•