Closed Bug 1594282 Opened 2 years ago Closed 2 years ago

Audit nsIDocShellTreeItem usage in nsDocShell::GetDocShellEnumerator


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




Fission Milestone M6


(Reporter: djvj, Unassigned)


(Blocks 1 open bug)


(Whiteboard: [rm-docshell-tree-item:simple])

This just casts (DocShell*)this to an nsIDocShellTreeItem to add to the enumerator list.

This needs to change but the bigger issue is just fixing the nsDocShellEnumerator implementation to use BrowsingContext to traverse the tree instead (stopping at process boundaries in the tree).

The users of nsDocShellEnumerator need to be fixed separately, but this function's fix itself will be trivial - obtaining a BrowsingContext to add instead of a tree-item.

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:


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 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:

:farre's presentation with examples of replacing nsIDocShellTreeItem with BrowsingContext, WindowContext, SyncedContexts, and BrowsingContextGroup:

Summary: Fix usage of nsIDocShellTreeItem in nsDocShell::GetDocShellEnumerator → Audit nsIDocShellTreeItem usage in nsDocShell::GetDocShellEnumerator

nsDocShell::GetDocShellEnumerator has been removed.

Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.