Closed Bug 1520772 Opened 2 years ago Closed 2 years ago

Construct the WebExtension target front before instantiating the Target object

Categories

(DevTools :: Framework, enhancement, P2)

enhancement

Tracking

(firefox66 fixed)

RESOLVED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

(Whiteboard: dt-fission)

Attachments

(1 file)

For now, the Web Extension target actor was constructed late, from Target.attach.
So that we were instantiating the Target class with a front which wasn't a target front until we call Target.attach that will replace the activeTab with the final, real web exntension target front.

https://searchfox.org/mozilla-central/rev/bee8cf15c901b9f4b0c074c9977da4bbebc506e3/devtools/client/framework/target.js#574-584

This is bad as we assume that activeTab is the target front, and that prevent us from merging target front and target classes.
So we should make it so that this code in attach is executed before instantiating the Target object.

Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/11325875967a
Construct the WebExtension target front before instantiating the Target object. r=yulia
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
You need to log in before you can comment on or make changes to this bug.