JsWindowActor based Frame target uses the wrong docShell for frames
Categories
(DevTools :: Framework, task, P3)
Tracking
(firefox73 fixed)
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
Attachments
(1 file, 1 obsolete file)
The FrameTargetActor currently retrieves its docShell from the "chromeGlobal" argument passed to the constructor.
For a top level frame target initialized via frame-connector.js (message-manager based), the chromeGlobal is the content message manager of the frame.js script. The docShell of this message manager is the docShell corresponding to the frame.
However for a remote frame, we currently fetch the message manager as follows:
// Create the actual target actor.
const { messageManager } = this.docShell;
const targetActor = new FrameTargetActor(connection, messageManager);
this
is the DevTools frame JsWindowActor. Here this.docShell
is the correct docShell for the frame, however, this.docShell.messageManager
seem to be the message manager of the parent frame, and therefore this.docShell.messageManager.docShell != this.docShell
.
We should explicitly pass the docShell as a constructor argument to the frame target to avoid this issue.
This was one of the problems mentioned in Bug 1600612.
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/00f9b55d3ac3 Create remote FrameTargetActor with the correct docShell r=ochameau
Comment 4•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•