Closed Bug 1566153 Opened 5 years ago Closed 5 years ago

Clean up empty BrowsingContextGroup

Categories

(Core :: DOM: Content Processes, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla70
Fission Milestone M4
Tracking Status
firefox70 --- fixed

People

(Reporter: nika, Assigned: jya)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

In bug 1525887 and bug 1540839 references were added to a BrowsingContextGroup when a content process subscribes to them, in the parent and child processes respectively. Unfortunately I believe that these references are currently not cleared when the BrowsingContextGroup becomes empty due to all BrowsingContexts loaded within it dying. We should make sure to clear this reference when the group becomes empty to allow for the group itself to be destroyed.

This should probably be done in BrowsingContextGroup::Unregister (https://searchfox.org/mozilla-central/rev/07f7390618692fa4f2a674a96b9b677df3a13450/docshell/base/BrowsingContextGroup.cpp#31), and clear the references added in the BrowsingContextGroup constructor (https://searchfox.org/mozilla-central/rev/07f7390618692fa4f2a674a96b9b677df3a13450/docshell/base/BrowsingContextGroup.cpp#16) and in Subscribe (https://searchfox.org/mozilla-central/rev/07f7390618692fa4f2a674a96b9b677df3a13450/docshell/base/BrowsingContextGroup.cpp#37).

:jya, This is one of the issues we discussed last week.

Flags: needinfo?(jyavenard)
Assignee: nobody → jyavenard
Flags: needinfo?(jyavenard)

We can remove references held in the ContentChild and the ContentParent once the BrowsingContextGroup becomes empty.
This allows to break the cycles and the BrowsingContextGroup to be deleted.

Depends on D38179

Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/822b3364ac30
P1. Remove unnecessary AddRef. r=nika
https://hg.mozilla.org/integration/autoland/rev/cb0d5b7f2933
P2. Clean-up BrowsingContextGroup references when empty. r=nika
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: