Closed Bug 1558176 Opened 10 months ago Closed 1 month ago

Make BrowsingContext be responsible for discard


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




Fission Milestone M5


(Reporter: farre, Unassigned)


(Blocks 1 open bug)


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.

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

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.