Bug 1253792 - Handle another case of re-entrancy through nsDocShell::InternalLoad. r=smaug

This commit is contained in:
Blake Kaplan 2016-03-09 12:26:00 -05:00
parent aa07d5bcbe
commit ce47da7e2a

View File

@ -10593,7 +10593,13 @@ nsDocShell::DoURILoad(nsIURI* aURI,
// If we have a requesting node, then use that as our loadingPrincipal.
loadingPrincipal = requestingNode->NodePrincipal();
} else {
MOZ_ASSERT(aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT);
if (aContentPolicyType != nsIContentPolicy::TYPE_DOCUMENT) {
// If this isn't a top-level load and mScriptGlobal's frame element is
// null, then the element got removed from the DOM while we were trying to
// load this resource. This docshell is scheduled for destruction already,
// so bail out here.
return NS_OK;
}
requestingWindow = mScriptGlobal->AsOuter();
}
}