Closed Bug 1583400 Opened 5 years ago Closed 5 years ago

HasActiveDocument() needs updating to work with Fission

Categories

(Core :: DOM: Core & HTML, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla71
Fission Milestone M4
Tracking Status
firefox71 --- fixed

People

(Reporter: pbone, Assigned: kmag)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

HasActiveDocument() needs updating to work with Fission.

https://searchfox.org/mozilla-central/source/dom/base/nsPIDOMWindowInlines.h#55

Kmag says that HasActiveWindow should check if the browsing context has the correct inner window.

Fission Milestone: ? → M4
Priority: -- → P2

This change also uninlines this method so that it can access the
BrowsingContext object without re-ordering C++ headers.

I've been trying to figure out why my patches don't work. I'm not getting very far and will have to give up and move on to something else.

But here's my notes regarding the attached patch.

There are some cases with this patch that fail in non-fision mode because the browsing context as a null mDocShell. While without the patch the inner window can find the outer window without going via the BrowsingContext. This is in the dom/ipc/tests/test_window_open_discarded_bc.html test.

Assignee: pbone → nobody
Status: ASSIGNED → NEW

In the cases where we call IsCurrentInnerWindow(), we care whether the inner
window is the current one for a BrowsingContext, rather than for a
GlobalWindowOuter, which is not always the same thing after a cross-process
navigation.

This patch fixes the logic to compare against the current window for the
BrowsingContext, and also updates HasActiveDocument() to simply check
IsCurrentInnerWindow(), which should be all that's necessary now that
document.open() no longer creates new inner windows.

Blocks: 1588220
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/686a306609ad
Make IsCurrentInnerWindow Fission-compatible. r=bzbarsky
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Assignee: nobody → kmaglione+bmo
Attachment #9097543 - 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: