Closed Bug 1594421 Opened 5 years ago Closed 4 years ago

[meta] Delete nsDocShell::GetAllDocShellsInSubtree() and fix its callers

Categories

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

defect

Tracking

()

RESOLVED FIXED
Fission Milestone M7

People

(Reporter: djvj, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: meta, Whiteboard: [rm-docshell-tree-item:hard])

The short-term change to this is just to move tree traversal entirely over to using BrowsingContext, and have the iterator skip over any out-of-process nodes when iterating children.

Long-term, this whole iterator is probably worthwhile to replace with some iterator over BrowsingContext that doesn't skip over any children at all, and leaves it up to the user to determine what to do when process boundaries are crossed.

As it stands, this iterator is very limited in functionality: it will act as if the tree terminates at process boundaries, and force the caller to use a side-path to check that property. At that point, it's better design just to have the caller use an enumerator protocol that walks the entire tree (in-process or not) via BrowsingContext, and handle the process-boundary switches in-line with the iteration.

Tentatively moving all bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to the "?" triage milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:

0ee3c76a-bc79-4eb2-8d12-05dc0b68e732

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

We need to audit this use of the nsIDocShellTreeItem interface. With Fission enabled, Documents and nsDocShells for related frames, such as subframes and parent documents, may not be available within the current process and the corresponding nsIDocShellTreeItem methods will return null.

If this code is broken with Fission, fixing it blocks enabling Fission is Nightly.

If this code works as-is with Fission, we don't need to remove this usage of nsIDocShellTreeItem until when we remove nsIDocShellTreeItem entirely (bug 1607591) after we ship Fission MVP.

Fission documentation about replacing nsIDocShellTree Item:
https://wiki.mozilla.org/Project_Fission/DocShell_Tree_Replace

:farre's presentation with examples of replacing nsIDocShellTreeItem with BrowsingContext, WindowContext, SyncedContexts, and BrowsingContextGroup:
https://docs.google.com/presentation/d/1K4j6ngty64TZjJNS5qH-MBoOm3TI2dJedVsbH8jUhKE/edit#slide=id.g6e35225e5d_1_264

Summary: Fix usage of nsIDocShellTreeItem in nsDocShellEnumerator → Audit usage of nsIDocShellTreeItem in nsDocShellEnumerator

Auditing whether this use of nsIDocShellTreeItem breaks when Fission is enabled blocks Fission Nightly.

Fission Milestone: M6 → M6b

GetAllDocShellsInSubtree() uses nsDocShellEnumerator internally.

Callers should use BrowsingContexts instead.

Summary: Audit usage of nsIDocShellTreeItem in nsDocShellEnumerator → Delete nsDocShell::GetAllDocShellsInSubtree() and fix its callers

Kashav, please audit the callers and file sub-bugs for them.

Assignee: nobody → kmadan
Status: NEW → ASSIGNED
Depends on: 1655520
Depends on: 1655521
Depends on: 1655528
Depends on: 1655547
Depends on: 1570965
Depends on: 1655549
Depends on: 1657435

Moving to M7 because of dependencies targeted for M7.

Fission Milestone: M6b → M7

The remaining usages of this are already handled now.

Extensions - Bug 1655528
Find - Bug 1570965 (broken for subframes even w/o Fission)
Devtools - Bug 1657435 (alex pushed a fix today)

Closing this meta as Fixed.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Assignee: kmadan → nobody
Summary: Delete nsDocShell::GetAllDocShellsInSubtree() and fix its callers → [meta] Delete nsDocShell::GetAllDocShellsInSubtree() and fix its callers
You need to log in before you can comment on or make changes to this bug.