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•6 years ago
|
||
| Assignee | ||
Comment 2•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 4•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
Description
•