Bug 1633204 - Live WindowContexts should keep BrowsingContextGroup alive, r=farre

Differential Revision: https://phabricator.services.mozilla.com/D72893
This commit is contained in:
Nika Layzell
2020-04-29 18:49:10 +00:00
parent 8641873e16
commit 4f1391ffaa
4 changed files with 38 additions and 31 deletions

View File

@@ -154,6 +154,7 @@ void WindowContext::Init() {
// Register this to the browsing context.
mBrowsingContext->RegisterWindowContext(this);
Group()->Register(this);
}
void WindowContext::Discard() {
@@ -167,6 +168,7 @@ void WindowContext::Discard() {
mIsDiscarded = true;
gWindowContexts->Remove(InnerWindowId());
mBrowsingContext->UnregisterWindowContext(this);
Group()->Unregister(this);
}
WindowContext::WindowContext(BrowsingContext* aBrowsingContext,