Closed Bug 1558176 Opened 10 months ago Closed 1 month ago

Make BrowsingContext be responsible for discard

Categories

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

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1582832
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.

Type: defect → enhancement
Fission Milestone: --- → ?
Priority: -- → P3
See Also: → 1555287, 1556975

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.

  1. https://www.executable-english.com/ibl_login.html
  2. Click the GO button in the middle of the page
  3. 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

(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.

Blocks: improve-bc
Fission Milestone: ? → M4
Fission Milestone: M4 → M5

I'll take a look.

Assignee: nobody → dteller

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()?

Flags: needinfo?(afarre)

As per our conversation with nika, this seems to have already been mostly done. Dropping bug.

Assignee: dteller → nobody

Since bug 1582832, nsDocShell::Destroy is no longer the responsible party for performing teardown of a BrowsingContext.

Status: NEW → RESOLVED
Closed: 1 month ago
Flags: needinfo?(afarre)
Resolution: --- → DUPLICATE
Duplicate of bug: 1582832
You need to log in before you can comment on or make changes to this bug.