Closed Bug 1597470 Opened 5 years ago Closed 4 years ago

Audit nsIDocShellTreeItem usage in AttachContainerRecurse & DetachContainerRecurse in layout/base/nsDocumentViewer.cpp

Categories

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

task

Tracking

()

RESOLVED DUPLICATE of bug 1671510
Fission Milestone M7

People

(Reporter: djvj, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [rm-docshell-tree-item:session-history])

In file layout/base/nsDocumentViewer.cpp

Recursive method that walk entire docshell subtree under a docshell tree item.

Called by Session-History logic within nsDocumentViewer::Open

Core logic: Accesses ContentViewer, then Document

  • Sets the attaches the containing DocShell to it.
  • Sets the ForwardingContainer field for the PresShell for the child window.

Relatively rare operation.

Change to using BrowsingContext.

Collect all out-of-process children across entire tree while traversing.

If list is non-empty, then send IPC to chrome with list of browsingcontext ids, and have chrome process broadcast this to all relevant processes.

Chrome process waits on all child process updates and responds when they are done.

Original sender process blocks on response from chrome process.

Kannan says replacing nsIDocShellTreeItem calls should block enabling Fission in Nightly (M6).

Fission Milestone: --- → M6
Priority: -- → P3

Moving to Layout.

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

Component: DOM: Navigation → Layout
Priority: P3 → --
Summary: Fix uses of AttachContainerRecurse & DetachContainerRecurse in layout/base/nsDocumentViewer.cpp → Audit nsIDocShellTreeItem usage in AttachContainerRecurse & DetachContainerRecurse in layout/base/nsDocumentViewer.cpp
Whiteboard: [rm-docshell-tree-item:session-history] → [rm-docshell-tree-item:session-history] [layout:triage-discuss]

The priority flag is not set for this bug.
:jwatt, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jwatt)

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

Fission Milestone: M6 → M6c

BFCache related

Whiteboard: [rm-docshell-tree-item:session-history] [layout:triage-discuss] → [rm-docshell-tree-item:session-history]
Type: defect → task
Fission Milestone: M6c → M7
Component: Layout → DOM: Navigation
Flags: needinfo?(jwatt)
Priority: -- → P3

This will be handled/fixed in bug 1671510 for BFCache redesign.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.