Migrate WebExtInspectedWindow front to a command
Categories
(WebExtensions :: Developer Tools, task, P2)
Tracking
(Fission Milestone:M7a, firefox89 fixed)
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
(Whiteboard: dt-fission-m3-mvp)
Attachments
(1 file)
While working on bug 1631451, I ended up having test failures on:
https://searchfox.org/mozilla-central/source/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow.js#544-545
targetsCount = await getTargetActorsCount(tab);
is(targetsCount, 0, "All targets were removed as toolbox was closed");
because ExtensionParent destroys the current top level target from here:
https://searchfox.org/mozilla-central/source/toolkit/components/extensions/ExtensionParent.jsm#716-719
this._currentDevToolsTarget.destroy();
More info about how it interacted with my changes related to target and descriptor destruction codepath on phabricator:
https://phabricator.services.mozilla.com/D106835#3536533
Having ExtensionParent and WebExt codebase to be working out of the current top level target front is the beginning of the troubles.
It forces ExtensionParent to involve a quite complex logic to track this target (use watchTargets on toolbox's client and memoize it, while toolbox's targetCommand already memoize the current top target via targetCommand.targetFront).
But instead of tweaking a bit how to maintain the target front, we should rather avoid using it entirely.
Instead we could migrate InspectedWindow front to become a command and only pass the new "commands" object.
For now, we only have one command, the TargetCommand.
I'll use this bug as an opportunity to demonstrate how to migrate some existing front code to a command and also how to implement a new command from scratch.
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b725fa7eb45f [devtools] Migrate WebExtInspectedWindow front to a command. r=nchevobbe,rpl
Comment 3•2 years ago
|
||
bugherder |
Description
•