Closed Bug 1570207 Opened 5 years ago Closed 5 years ago

Move CanAccess logic from DocShell to BrowsingContext

Categories

(Core :: DOM: Navigation, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla70
Fission Milestone M4
Tracking Status
firefox70 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

BrowsingContext::CanAccess currently defers to nsDocShell to determine whether one BrowsingContext can navigate another. This means that it only works for in-process DocShells, and crashes when used with OOP contexts.

The existing DocShell logic is also much more complicated than it needs to be, given the current architecture. It was written in a time before named targetting was restricted to a single TabGroup/BrowsingContextGroup, which makes most of its remaining OriginAttributes and private browsing checks completely unnecessary.

This change is necessary in order to support named targeting of remote
BrowsingContexts, since the current arrangement only supports in-process
contexts. It also considerably simplifies the logic, since named targetting is
now restricted to the same TabGroup/BrowsingContextGroup, which in and of
itself guarantees that origin attributes will always match in the cases that
we care about.

Attachment #9081852 - Attachment description: Bug 1570207: Part 2 - Remove skip-if annotations for crashes in CanAccessItem. r=nika → Bug 1570207: Part 2 - Remove skip-if/fail-if annotations for CanAccessItem failures. r=nika
Status: NEW → ASSIGNED
Fission Milestone: --- → M4
Priority: -- → P2
https://hg.mozilla.org/integration/mozilla-inbound/rev/7bfc8b1c626dcf3cf146fafc606fbe0cf8064d1a
Bug 1570207: Part 1 - Move CanAccess logic from DocShell to BrowsingContext. r=nika

https://hg.mozilla.org/integration/mozilla-inbound/rev/783c0e44c713d31bdf14dd84bdded192171343d1
Bug 1570207: Part 2 - Remove skip-if/fail-if annotations for CanAccessItem failures. r=nika
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Regressions: 1570899
Regressions: 1570903
No longer regressions: 1570899
No longer regressions: 1570903
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/5bfe96677cf3
Follow-up: Update failure annotations. r=mccr8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: