Migrate devtools network observer to an ES module
Categories
(Remote Protocol :: Agent, task, P1)
Tracking
(firefox108 fixed)
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 4 open bugs)
Details
(Whiteboard: [webdriver:m5])
Attachments
(4 files)
The first step to make the DevTools network observer codebase shared with remote/ is to migrate the code from DevTools common JS modules to ESM.
In this bug we don't intend to change the interface of the observer at all, the goal is only to do a technical migration and to check that there are no issues when using (and debugging) the network observer modules
Comment 1•2 years ago
|
||
To understand the topic right of this bug you are planning to move the observer or to place a ES copy of it into remote? Maybe we should clarify that a bit better in the summary.
Assignee | ||
Comment 2•2 years ago
|
||
The goal is only to migrate the common JS module to ESM. The modules will stay in the same location, will not move to remote, etc...
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D156968
Cleanup of the ChannelMap class
- use private fields
- move static method to module-local method
- add comments
- rename methods to match behavior
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Requires some devtools changes before we can actually continue with this bug.
Updated•2 years ago
|
Comment 6•2 years ago
|
||
Unfortunately, defineESModuleGetters is only contextual.
There is no argument to force it to load in another global.
This requires to switch to synchronous import, or,
introduce some temporary lazy getter until we migrate CommonJS modules to ESM.
At the end of ESM migration, we should mostly have one usage of loadInDevToolsLoader:true,
when we import DevToolsServer from Launcher.sys.mjs. Then, it should all be contextual.
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D156989
Updated•2 years ago
|
Comment 9•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7fb16f9cb039
https://hg.mozilla.org/mozilla-central/rev/ea331a657dc9
https://hg.mozilla.org/mozilla-central/rev/f87b165f729e
Description
•