Bug 538724 Firefox 3.6.x + winxp topcrash starting ~Dec 30 and increasing [@ nsHttpTransaction::DeleteSelfOnConsumerThread() ]
authortimeless@mozdev.org
Sat, 11 Jun 2011 16:56:36 +0200
changeset 35243 6ba95e5c9621fa60854e641355667659ee01ad40
parent 35242 6a3b9290d82390b5ca860bdb569c4b8a0db34848
child 35244 a46281bc813e59ce6138d9aaa7fdff332a988978
push id2009
push useralqahira@ardisson.org
push dateWed, 04 Jan 2012 03:09:24 +0000
bugs538724
milestone1.9.2.26pre
Bug 538724 Firefox 3.6.x + winxp topcrash starting ~Dec 30 and increasing [@ nsHttpTransaction::DeleteSelfOnConsumerThread() ] r=biesi, a1.9.2.26=dveditz
netwerk/protocol/http/src/nsHttpTransaction.cpp
--- a/netwerk/protocol/http/src/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/src/nsHttpTransaction.cpp
@@ -1080,19 +1080,20 @@ private:
 };
 
 void
 nsHttpTransaction::DeleteSelfOnConsumerThread()
 {
     LOG(("nsHttpTransaction::DeleteSelfOnConsumerThread [this=%x]\n", this));
     
     PRBool val;
-    if (NS_SUCCEEDED(mConsumerTarget->IsOnCurrentThread(&val)) && val)
+    if (!mConsumerTarget ||
+        (NS_SUCCEEDED(mConsumerTarget->IsOnCurrentThread(&val)) && val)) {
         delete this;
-    else {
+    } else {
         LOG(("proxying delete to consumer thread...\n"));
         nsCOMPtr<nsIRunnable> event = new nsDeleteHttpTransaction(this);
         if (NS_FAILED(mConsumerTarget->Dispatch(event, NS_DISPATCH_NORMAL)))
             NS_WARNING("failed to dispatch nsHttpDeleteTransaction event");
     }
 }
 
 //-----------------------------------------------------------------------------