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

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

View File

@ -10590,7 +10590,13 @@ nsDocShell::DoURILoad(nsIURI* aURI,
// If we have a requesting node, then use that as our loadingPrincipal. // If we have a requesting node, then use that as our loadingPrincipal.
loadingPrincipal = requestingNode->NodePrincipal(); loadingPrincipal = requestingNode->NodePrincipal();
} else { } 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(); requestingWindow = mScriptGlobal->AsOuter();
} }
} }