Open Bug 1574261 Opened 1 year ago Updated 2 months ago

Fix usage of nsIDocShellTreeItem in nsDocShell::MaybeHandleSubFrameHistory

Categories

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

enhancement

Tracking

()

Fission Milestone M6

People

(Reporter: djvj, Unassigned)

References

(Blocks 1 open bug)

Details

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

https://searchfox.org/mozilla-central/source/docshell/base/nsDocShell.cpp#782

In this function, the same-type parent of the current document is obtained. If the parent is null or the same as this, then the this docshell is treated as the root.

This logic is erroneous in a post-fission semantics. The parent may be null if the parent document is out-of-process. To handle this, the logic around retrieving a parent should be changed to use the BrowsingContext to check for a parent.

Furthermore, the function goes on to retrieve the nsDocShell associated with the parent document, and perform various operations on it. The main job of the function is to adjust the session-history state of the child based on the state of the parent document.

This logic will need to be changed to use IPC to retrieve this information from a remote process (if needed). For performance reasons, it is probably a good idea to detect the situation where the parent is in process, and use the existing logic for that.

Component: DOM: Core & HTML → Document Navigation
Fission Milestone: --- → M5
Priority: -- → P3
Priority: P3 → P2
Whiteboard: [rm-docshell-tree-item:session-history]
Fission Milestone: M5 → Future

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

Fission Milestone: Future → M6
You need to log in before you can comment on or make changes to this bug.