Open Bug 1597473 Opened 1 year ago Updated 3 months ago

Make nsSHistory::EvictOutOfRangeContentViewers work in fission world (pre: Audit nsIDocShellTreeItem usage in nsDocumentViewer::Show in layout/base/nsDocumentViewer.cpp)

Categories

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

defect

Tracking

()

Fission Milestone M7

People

(Reporter: djvj, Unassigned)

References

(Blocks 2 open bugs)

Details

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

In file layout/base/nsDocumentViewer.cpp

https://searchfox.org/mozilla-central/rev/6566d92dd46417a2f57e75c515135ebe84c9cef5/layout/base/nsDocumentViewer.cpp#2184

This code is called to maybe clear some cached ContentViewers (in SHistory) when a new viewer is created.

Accesses session-history from root docshell as (nsIWebNagivation).

It’s just cache maintenance code, not that perf sensitive.

Change to using BrowsingContext to traverse to root.

If root is out-of-process, implement appropriate forwarding via async IPC (do not need to wait for response).

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

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

Moving to Layout triage.

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 nsDocumentViewer::Show in layout/base/nsDocumentViewer.cpp → Audit nsIDocShellTreeItem usage in nsDocumentViewer::Show in layout/base/nsDocumentViewer.cpp
Whiteboard: [rm-docshell-tree-item:hard] → [rm-docshell-tree-item:hard] [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
Whiteboard: [rm-docshell-tree-item:hard] [layout:triage-discuss] → [rm-docshell-tree-item:hard]
See Also: → 1597471

I did ask :peterv in Fission channel about whether EvictOutOfRangeContentViewers (which is used in nsDocumentViewer::Show) highly depends on remaining session history work or can be easily made it work in fission by adding a couple of IPC calls, he said it's the former.

So, I am going to re-use this bug to make the function work in Fission and also move the bug into DOM:Navigation. I am also changing the milestone from M6c to M7. If it's not correct, please re-change it.

Fission Milestone: M6c → M7
Component: Layout → DOM: Navigation
Flags: needinfo?(jwatt)
Summary: Audit nsIDocShellTreeItem usage in nsDocumentViewer::Show in layout/base/nsDocumentViewer.cpp → Make nsSHistory::EvictOutOfRangeContentViewers work in fission world (pre: Audit nsIDocShellTreeItem usage in nsDocumentViewer::Show in layout/base/nsDocumentViewer.cpp)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.