Bug 717773 - Crash [@ SpdySession::LogIO], r=mcmanus
authorHonza Bambas <honzab.moz@firemni.cz>
Fri, 13 Jan 2012 16:36:03 +0100
changeset 85646 9fab07be5d36ab8bfbd8eb0d72299e1a119097a6
parent 85645 63c3d103610c3febbd8dd20748c077a0b5935a03
child 85647 b605399234fcaa52134392bcc58248ae8d977b15
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs717773
milestone12.0a1
Bug 717773 - Crash [@ SpdySession::LogIO], r=mcmanus
netwerk/protocol/http/SpdyStream.cpp
--- a/netwerk/protocol/http/SpdyStream.cpp
+++ b/netwerk/protocol/http/SpdyStream.cpp
@@ -524,25 +524,25 @@ SpdyStream::TransmitFrame(const char *bu
 
   while (avail) {
     NS_ABORT_IF_FALSE(countUsed, "null countused pointer in a stream context");
     rv = mSegmentReader->OnReadSegment(buf + offset, avail, &transmittedCount);
 
     LOG3(("SpdyStream::TransmitFrame for regular session=%p "
           "stream=%p result %x len=%d",
           mSession, this, rv, transmittedCount));
-    SpdySession::LogIO(mSession, this, "Writing from Transaction Buffer",
-                       buf + offset, transmittedCount);
-
     if (rv == NS_BASE_STREAM_WOULD_BLOCK)
       mBlockedOnWrite = 1;
 
     if (NS_FAILED(rv))     // this will include WOULD_BLOCK
       return rv;
     
+    SpdySession::LogIO(mSession, this, "Writing from Transaction Buffer",
+                       buf + offset, transmittedCount);
+
     if (mUpstreamState == SENDING_REQUEST_BODY) {
       mTransaction->OnTransportStatus(mSocketTransport,
                                       nsISocketTransport::STATUS_SENDING_TO,
                                       transmittedCount);
     }
     
     *countUsed += transmittedCount;
     avail -= transmittedCount;