Bug 959172 - Double SpdySession::CleanupStream. r=hurley, a=bajaj
authorPatrick McManus <mcmanus@ducksong.com>
Mon, 13 Jan 2014 10:10:10 -0500
changeset 175756 47b8a0b8c7043fc71257ca8806cad5264c6b288c
parent 175755 5651a38edf74692c35a864096a220eb538c650b2
child 175757 dffdacbb272c95f3b666f5526866678ebf45be14
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley, bajaj
bugs959172
milestone28.0a2
Bug 959172 - Double SpdySession::CleanupStream. r=hurley, a=bajaj
netwerk/protocol/http/SpdySession3.cpp
netwerk/protocol/http/SpdySession31.cpp
--- a/netwerk/protocol/http/SpdySession3.cpp
+++ b/netwerk/protocol/http/SpdySession3.cpp
@@ -838,17 +838,20 @@ SpdySession3::VerifyStream(SpdyStream3 *
 }
 
 void
 SpdySession3::CleanupStream(SpdyStream3 *aStream, nsresult aResult,
                            rstReason aResetCode)
 {
   MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
   LOG3(("SpdySession3::CleanupStream %p %p 0x%X %X\n",
-        this, aStream, aStream->StreamID(), aResult));
+        this, aStream, aStream ? aStream->StreamID() : 0, aResult));
+  if (!aStream) {
+    return;
+  }
 
   SpdyPushedStream3 *pushSource = nullptr;
 
   if (NS_SUCCEEDED(aResult) && aStream->DeferCleanupOnSuccess()) {
     LOG(("SpdySession3::CleanupStream 0x%X deferred\n", aStream->StreamID()));
     return;
   }
 
--- a/netwerk/protocol/http/SpdySession31.cpp
+++ b/netwerk/protocol/http/SpdySession31.cpp
@@ -869,17 +869,20 @@ SpdySession31::VerifyStream(SpdyStream31
 }
 
 void
 SpdySession31::CleanupStream(SpdyStream31 *aStream, nsresult aResult,
                              rstReason aResetCode)
 {
   MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
   LOG3(("SpdySession31::CleanupStream %p %p 0x%X %X\n",
-        this, aStream, aStream->StreamID(), aResult));
+        this, aStream, aStream ? aStream->StreamID() : 0, aResult));
+  if (!aStream) {
+    return;
+  }
 
   SpdyPushedStream31 *pushSource = nullptr;
 
   if (NS_SUCCEEDED(aResult) && aStream->DeferCleanupOnSuccess()) {
     LOG(("SpdySession31::CleanupStream 0x%X deferred\n", aStream->StreamID()));
     return;
   }