Clean up empty BrowsingContextGroup
Categories
(Core :: DOM: Content Processes, enhancement, P2)
Tracking
()
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).
Reporter | ||
Comment 1•5 years ago
|
||
:jya, This is one of the issues we discussed last week.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
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
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/822b3364ac30
https://hg.mozilla.org/mozilla-central/rev/cb0d5b7f2933
Description
•