Audit usage of nsIDocShellTreeItem in nsContentUtils::ShouldBlockReservedKeys
Categories
(Core :: DOM: Navigation, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox81 | --- | fixed |
People
(Reporter: djvj, Assigned: smacleod)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [rm-docshell-tree-item:sync-state])
Attachments
(2 files)
(Move state to BrowsingContext).
This code retrieves the same-type root from the docshell tree, and then checks the following property of the principal for the root document:
IsSitePermDeny(rootPrincipal, "shortcuts").
The callers of this is key-handling code. Does not seem like this method would be called in contexts where only in-process tree fragments are accessed, and that this query may cross process boundaries.
This check is likely done frequently, and not a candidate for IPC or active querying. The result of this query can be cached ahead of time in the BrowsingContext tree and used from there.
| Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Kannan says replacing nsIDocShellTreeItem calls should block enabling Fission in Nightly (M6).
| Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 2•5 years ago
|
||
Auditing whether this use of nsIDocShellTreeItem breaks when Fission is enabled blocks Fission Nightly.
Comment 3•5 years ago
|
||
We can add a WindowContext synced field to the toplevel window context which records a cached permission value for the "shortcuts"_ns permission, much like how we handle the AutoplayPermission: https://searchfox.org/mozilla-central/rev/82c04b9cad5b98bdf682bd477f2b1e3071b004ad/docshell/base/WindowContext.h#49
Updated•5 years ago
|
| Assignee | ||
Comment 4•5 years ago
|
||
We now cache the shortcuts permission in a synced field on
WindowContext. This will allow checking the permission quickly and
without IPC when Fission is enabled and the top-level document is
in another process.
| Assignee | ||
Comment 5•5 years ago
|
||
We now use the cached value of the shortcuts permission from
WindowContext if we cannot get a Browser. This will now work
when calling from a child where the top-level document is OOP.
Depends on D84182
Updated•5 years ago
|
Updated•5 years ago
|
Comment 7•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/7e8123465017
https://hg.mozilla.org/mozilla-central/rev/585e728dd155
Description
•