Bug 700493 - Stop overlay load after document went away, r=bz

This commit is contained in:
Honza Bambas 2012-04-25 14:50:20 +02:00
parent 4e73d1b2fc
commit 499a99bce5

View File

@ -2762,6 +2762,11 @@ nsXULDocument::LoadOverlayInternal(nsIURI* aURI, bool aIsDynamic,
// Not there. Initiate a load. // Not there. Initiate a load.
PR_LOG(gXULLog, PR_LOG_DEBUG, ("xul: overlay was not cached")); PR_LOG(gXULLog, PR_LOG_DEBUG, ("xul: overlay was not cached"));
if (mIsGoingAway) {
PR_LOG(gXULLog, PR_LOG_DEBUG, ("xul: ...and document already destroyed"));
return NS_ERROR_NOT_AVAILABLE;
}
// We'll set the right principal on the proto doc when we get // We'll set the right principal on the proto doc when we get
// OnStartRequest from the parser, so just pass in a null principal for // OnStartRequest from the parser, so just pass in a null principal for
// now. // now.