Allow loading JSProcess Actors in the module loader dedicated to DevTools
Categories
(Core :: DOM: Content Processes, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox122 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(1 file)
Bug 1790383 introduced a new Module Loader instance which is dedicated to DevTools. See mozJSModuleLoader::GetDevToolsLoader().
This is only used by the Browser Content/Toolbox when debugging privileged scope.
This dedicated module loader allows us to have a distinct global for DevTools modules.
This is required when debugging the "shared JSM global" so that debuggee and debugger modules are loaded from distinct compartments.
The spidermonkey Debugger API has this strong requirement where debuggee and debugger should run in distinct compartment so that it can easily distinguish the two when instrumenting the debuggee.
https://searchfox.org/mozilla-central/rev/27ddf0064aa821af8238a99621df79fb1b301c7b/js/src/debugger/Debugger.cpp#4752-4757
Bug 1790383 started using this new module loader, but not for JSWindow/JSProcess Actors.
Because of that we are not able to debug them from the browser toolbox without re-entrancy issues where the browser toolbox would debug itself.
In bug 1648499, I'm trying to migrate DevTools from content process message managers to JS Process Actor and this becomes a stronger requirement to load the JS Process Actor in the DevTools module loader.
| Assignee | ||
Comment 1•2 years ago
|
||
Passing loadInDevToolsLoader to JSProcess actor options will force loading
both parent and content modules in the distinct module loader used by DevTools.
This distinct module loader is maintained by mozJSModuleLoader and is used
by the DevTools Browser Console/Toolbox to debug privileged JS code
typically using the "shared JSM Global" from DevTools modules
loaded in a distinct and specific DevTools module loader.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
| bugherder | ||
Description
•