Closed Bug 1605027 Opened 4 years ago Closed 4 years ago

JsWindowActor based Frame target uses the wrong docShell for frames

Categories

(DevTools :: Framework, task, P3)

task

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
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.

Attachment #9116984 - Attachment is obsolete: true
Attachment #9116984 - Attachment is obsolete: false
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/00f9b55d3ac3
Create remote FrameTargetActor with the correct docShell r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
Attachment #9116984 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: