Bug 700493 - Firefox Crash in nsJARChannel::OnStopRequest @ nsXULPrototypeScript::SerializeOutOfLine, r=bzbarsky, a=akeybl
authorHonza Bambas <honzab.moz@firemni.cz>
Fri, 25 May 2012 21:22:53 +0200
changeset 95872 efe05056199fb9159c07717de7ae4dc74e5ad62e
parent 95871 4f318c1fea777e6469b6ce6ff9fb5bfd903d51af
child 95873 7f3c5dd8e78f8bc483f52436db595f4aaf5e1511
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky, akeybl
bugs700493
milestone14.0a2
Bug 700493 - Firefox Crash in nsJARChannel::OnStopRequest @ nsXULPrototypeScript::SerializeOutOfLine, r=bzbarsky, a=akeybl
content/xul/document/src/nsXULDocument.cpp
--- a/content/xul/document/src/nsXULDocument.cpp
+++ b/content/xul/document/src/nsXULDocument.cpp
@@ -2757,16 +2757,21 @@ nsXULDocument::LoadOverlayInternal(nsIUR
         // this is a dynamic overlay, this will call ResumeWalk.
         // Otherwise, we'll return to ResumeWalk, which called us.
         return OnPrototypeLoadDone(aIsDynamic);
     }
     else {
         // Not there. Initiate a load.
         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
         // OnStartRequest from the parser, so just pass in a null principal for
         // now.
         nsCOMPtr<nsIParser> parser;
         rv = PrepareToLoadPrototype(aURI, "view", nsnull, getter_AddRefs(parser));
         if (NS_FAILED(rv)) return rv;
 
         // Predicate mIsWritingFastLoad on the XUL cache being enabled,