Closed Bug 1573621 Opened 1 year ago Closed 1 year ago

Location objects need to handle navigation to OOP documents

Categories

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

defect

Tracking

()

RESOLVED FIXED
Fission Milestone M4

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 2 open bugs)

Details

When a window navigates, any extant references to its Location object still refer to the location of the outer window, and need to do permission checks and navigations as appropriate.

When a frame navigates from a local document to a remote document, though, any extant Location objects still perform checks and load operations against their docShell, which doesn't know that the frame has been navigated.

The simplest solution is to check the BrowsingContext rather than the docShell. For remote BCs, we can assume that the caller does not have access to the location, and reject any read requests. For local ones, we can fall back to the docShell for permission checks and to read the URL.

Navigations are trickier. For remote BCs, we'll need to use whatever logic we eventually implement for remote Location proxies. For local ones, we can just stick to the existing docShell logic.

Farre, are you working on conversions like this?

Flags: needinfo?(afarre)
Priority: -- → P2

Seems to be the cause of failure for some mochitests-fission tests:
js/xpconnect/tests/mochitest/test_bug636097.html
js/xpconnect/tests/mochitest/test_bug800864.html
js/xpconnect/tests/mochitest/test_bug802557.html

js/xpconnect/tests/mochitest/test_bug636097.html and js/xpconnect/tests/mochitest/test_bug800864.html have been fixed by bug 1577723.

Flags: needinfo?(afarre)
Assignee: nobody → kmaglione+bmo
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Type: defect → task
Fission Milestone: --- → M4
Type: task → defect
You need to log in before you can comment on or make changes to this bug.