Bug 1286664 - TLSFilterTransaction::WriteSegments null Connection() r=hurley
authorPatrick McManus <mcmanus@ducksong.com>
Wed, 13 Jul 2016 16:52:51 -0400
changeset 304996 aeec04b71527b443c169099cc125288746cc0926
parent 304995 4d4289b95a79141772f3ef7291e3c47b09063a41
child 304997 3b81d91e78c78029e7da13206e9940a49b475e9f
push id79480
push usermcmanus@ducksong.com
push dateThu, 14 Jul 2016 16:16:07 +0000
treeherdermozilla-inbound@aeec04b71527 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley
bugs1286664
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1286664 - TLSFilterTransaction::WriteSegments null Connection() r=hurley
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;
 }