forked from mirrors/gecko-dev
Bug 1917017 - Add a null-check in FirePageHideEventForFrameLoaderSwap. r=smaug, a=dsmith
Not sure what guarantees this in presence of random script running? Differential Revision: https://phabricator.services.mozilla.com/D222335
This commit is contained in:
parent
c07d0da21a
commit
677d8613eb
1 changed files with 3 additions and 3 deletions
|
|
@ -8909,9 +8909,9 @@ void nsContentUtils::FirePageHideEventForFrameLoaderSwap(
|
|||
MOZ_DIAGNOSTIC_ASSERT(aItem);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aChromeEventHandler);
|
||||
|
||||
RefPtr<Document> doc = aItem->GetDocument();
|
||||
NS_ASSERTION(doc, "What happened here?");
|
||||
doc->OnPageHide(true, aChromeEventHandler, aOnlySystemGroup);
|
||||
if (RefPtr<Document> doc = aItem->GetDocument()) {
|
||||
doc->OnPageHide(true, aChromeEventHandler, aOnlySystemGroup);
|
||||
}
|
||||
|
||||
int32_t childCount = 0;
|
||||
aItem->GetInProcessChildCount(&childCount);
|
||||
|
|
|
|||
Loading…
Reference in a new issue