Bug 1659825 - Null check gWindowContexts in WindowContext::Discard(). r=nika

If we're after shutdown, then this variable will have been cleared.
This is the remaining use that was failing to do a null check, and
it was manifesting as a very low-volume crash.

Differential Revision: https://phabricator.services.mozilla.com/D87503
This commit is contained in:
Andrew McCreight
2020-08-18 21:46:07 +00:00
parent 4b4c90f2f3
commit 8cc409db82

View File

@@ -304,7 +304,9 @@ void WindowContext::Discard() {
}
mIsDiscarded = true;
gWindowContexts->Remove(InnerWindowId());
if (gWindowContexts) {
gWindowContexts->Remove(InnerWindowId());
}
mBrowsingContext->UnregisterWindowContext(this);
Group()->Unregister(this);
}