Open Bug 1807904 Opened 2 years ago Updated 9 months ago

Avoid using gDevTools.showToolbox from toolbox-init and drop PageHost

Categories

(DevTools :: Framework, task)

task

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Blocks 1 open bug)

Details

For now we are going through gDevTools.showToolbox from toolbox-init:
https://searchfox.org/mozilla-central/rev/8fd39dc89c68501a354446a8681ec8263d15e5aa/devtools/client/framework/toolbox-init.js#118

But will no longer be possible once the toolbox runs in another process.
gDevTools will run in the parent process and Toolbox-init in a privileged process.

Also, a significant part of gDevTools.showToolbox is to instantiate the ToolboxHostManager,
which mostly do the glue between the Toolbox and the ToolboxHost.
But the PageHost isn't doing anything.
https://searchfox.org/mozilla-central/rev/8fd39dc89c68501a354446a8681ec8263d15e5aa/devtools/client/framework/toolbox-hosts.js#401-422

The only useful bit is the emission of "toolbox-ready", which is listened over there:
https://searchfox.org/mozilla-central/rev/8fd39dc89c68501a354446a8681ec8263d15e5aa/browser/components/extensions/parent/ext-devtools.js#415-439
to inject WebExtension devtools addon into new toolboxes.
Now... given that toolbox-init is only used by about:debugging toolboxes, this isn't yet an issue to drop this event as this code in ext-devtools only consider local tabs toolboxes. And even if you pick a local tab in about:debugging, the related toolboxes aren't flagged with isLocalTab:true. So WebExt addons won't work in about:debugging targets anyway today.

You need to log in before you can comment on or make changes to this bug.