Bug 1555287 - Make sure to detach browsing context children early. r=nika

Waiting for docshells and frameloaders to destroy will leave attached
browsing contexts attached too long. In case the children of a
browsing contexts cannot be cached we want to detach all of them as
soon as possible.

Also normalizes the use of BrowsingContext::mGroup.

Differential Revision: https://phabricator.services.mozilla.com/D33602
This commit is contained in:
Andreas Farre
2019-06-12 15:35:17 +00:00
parent 26ad1a5c77
commit 28ad206e7f
8 changed files with 111 additions and 28 deletions

View File

@@ -541,6 +541,8 @@ void nsDocShell::DestroyChildren() {
}
nsDocLoader::DestroyChildren();
mBrowsingContext->DetachChildren();
}
NS_IMPL_CYCLE_COLLECTION_INHERITED(nsDocShell, nsDocLoader,