Make BrowsingContext be responsible for discard
Categories
(Core :: DOM: Navigation, enhancement, P3)
Tracking
()
Fission Milestone | M5 |
People
(Reporter: farre, Unassigned)
References
(Blocks 1 open bug)
Details
Currently the discard operation on browsing contexts roughly happen in BrowsingContext::Detach, but the driver behind it is nsDocShell::Destroy, it should be the other way around. Discarding a browsing context should be an operation directly performed on a browsing context in the places where browsing contexts are discarded.
Especially the discrepancy between nsDocShell::Destroy and nsDocShell::DestroyChildren would be good to clean up by consolidating discard behaviour in BrowsingContext. In particular the fact that nsDocShell::DestroyChildren doesn't actually call nsDocShell::Destroy on its children, but only removes them from its list of children.
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
For convenience here's a quick test to see if the originating bug id=1554715 has been fixed by any changes you make to 1555287 or 1558176.
- https://www.executable-english.com/ibl_login.html
- Click the GO button in the middle of the page
- click the Go button top right.
In FF 67 you will see a display with the top frame missing. In FF 66, Opera, Chrome or Edge, you will see the correct display that shows the top and bottom frames.
Hope this helps -- Adrian
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Adrian Walker from comment #1)
Hope this helps -- Adrian
Sure does, thanks! I'll see if I can make a wpt test case out of this.
Updated•5 years ago
|
Updated•5 years ago
|
I'll take a look.
Just to clarify, we're talking about https://searchfox.org/mozilla-central/rev/cfd1cc461f1efe0d66c2fdc17c024a203d5a2fd8/docshell/base/nsDocShell.cpp#4584-4588 and moving the calls to mBrowsingContext->Detach()
to... where exactly? To wherever we call nsDocShell:Destroy()
?
As per our conversation with nika, this seems to have already been mostly done. Dropping bug.
Comment 6•4 years ago
|
||
Since bug 1582832, nsDocShell::Destroy is no longer the responsible party for performing teardown of a BrowsingContext.
Description
•