Bug 1286664 - TLSFilterTransaction::WriteSegments null Connection(). r=hurley, a=sylvestre
authorPatrick McManus <mcmanus@ducksong.com>
Wed, 13 Jul 2016 16:52:51 -0400
changeset 325458 e59e20a2479eac927ff6a42d1be34c4305f21b54
parent 325457 707a1c447539311e191f8fcfe07a7e7eef505fd8
child 325459 f0622a239badac53bf79a280489a818a895400fb
push id9799
push usercbook@mozilla.com
push dateMon, 18 Jul 2016 08:47:40 +0000
treeherdermozilla-aurora@e59e20a2479e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley, sylvestre
bugs1286664
milestone49.0a2
Bug 1286664 - TLSFilterTransaction::WriteSegments null Connection(). r=hurley, a=sylvestre
netwerk/protocol/http/TunnelUtils.cpp
--- a/netwerk/protocol/http/TunnelUtils.cpp
+++ b/netwerk/protocol/http/TunnelUtils.cpp
@@ -346,17 +346,17 @@ TLSFilterTransaction::WriteSegments(nsAH
     return NS_ERROR_UNEXPECTED;
   }
 
   mSegmentWriter = aWriter;
   nsresult rv = mTransaction->WriteSegments(this, aCount, outCountWritten);
   if (NS_SUCCEEDED(rv) && NS_FAILED(mFilterReadCode) && !(*outCountWritten)) {
     // nsPipe turns failures into silent OK.. undo that!
     rv = mFilterReadCode;
-    if (mFilterReadCode == NS_BASE_STREAM_WOULD_BLOCK) {
+    if (Connection() && (mFilterReadCode == NS_BASE_STREAM_WOULD_BLOCK)) {
       Connection()->ResumeRecv();
     }
   }
   LOG(("TLSFilterTransaction %p called trans->WriteSegments rv=%x %d\n",
        this, rv, *outCountWritten));
   return rv;
 }