Closed Bug 1573669 Opened 5 months ago Closed 4 months ago

Fix usage of nsIDocShellTreeItem in nsDocShell::DestroyChildren

Categories

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

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1445659
Fission Milestone M5

People

(Reporter: djvj, Unassigned)

References

(Blocks 1 open bug)

Details

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

This function iterates over all the children of a document and sets its TreeOwner to null. It's reasonably clear that the intent of this method is to destroy all children.

However, as it stands, the list of children post-fission will only include in-process children, and no handling for out-of-process children.

This method needs to be changed to discover all children, including out-of-process children, destroy the local children, and use IPC to request that the remote children be destroyed as well.

Component: DOM: Core & HTML → Document Navigation
Fission Milestone: --- → M5
Priority: -- → P2

Given this: https://searchfox.org/mozilla-central/rev/1d0e84d2ec2843924bc6e5ed6658f93439e12351/docshell/base/nsDocShell.cpp#8425

And this: https://searchfox.org/mozilla-central/rev/1d0e84d2ec2843924bc6e5ed6658f93439e12351/docshell/base/nsDocShell.cpp#7703

Occurring prior to the only two calls to this, I think this code is fine as is. The OOP children are handled at the lines above, and the call to DestroyChildren only needs to care about the in-process segment of the tree.

Closing as DUP of bug 1445659. Confirming with farre.

Status: NEW → RESOLVED
Closed: 4 months ago
Flags: needinfo?(afarre)
Resolution: --- → DUPLICATE
Duplicate of bug: 1445659

So I can confirm this. I'm not at all satisfied with how DestroyChildren works, but that's more of an enhancement thing rather than something that's not working.

Flags: needinfo?(afarre)
You need to log in before you can comment on or make changes to this bug.