зеркало из https://github.com/mozilla/gecko-dev.git
bug 758725 spdy act on fin on synreply r=honzab
This commit is contained in:
Родитель
a79b4c376a
Коммит
c1096ca2e1
|
@ -1984,15 +1984,8 @@ SpdySession::OnWriteSegment(char *buf,
|
|||
|
||||
if (mInputFrameDataLast &&
|
||||
mInputFrameDataRead == mInputFrameDataSize) {
|
||||
// This will result in Close() being called
|
||||
NS_ABORT_IF_FALSE(!mNeedsCleanup, "mNeedsCleanup unexpectedly set");
|
||||
mNeedsCleanup = mInputFrameDataStream;
|
||||
|
||||
LOG3(("SpdySession::OnWriteSegment %p - recorded downstream fin of "
|
||||
"stream %p 0x%X", this, mInputFrameDataStream,
|
||||
mInputFrameDataStream->StreamID()));
|
||||
*countWritten = 0;
|
||||
ResetDownstreamState();
|
||||
SetNeedsCleanup();
|
||||
return NS_BASE_STREAM_CLOSED;
|
||||
}
|
||||
|
||||
|
@ -2018,7 +2011,7 @@ SpdySession::OnWriteSegment(char *buf,
|
|||
if (mFlatHTTPResponseHeaders.Length() == mFlatHTTPResponseHeadersOut &&
|
||||
mInputFrameDataLast) {
|
||||
*countWritten = 0;
|
||||
ResetDownstreamState();
|
||||
SetNeedsCleanup();
|
||||
return NS_BASE_STREAM_CLOSED;
|
||||
}
|
||||
|
||||
|
@ -2040,6 +2033,19 @@ SpdySession::OnWriteSegment(char *buf,
|
|||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
void
|
||||
SpdySession::SetNeedsCleanup()
|
||||
{
|
||||
LOG3(("SpdySession::SetNeedsCleanup %p - recorded downstream fin of "
|
||||
"stream %p 0x%X", this, mInputFrameDataStream,
|
||||
mInputFrameDataStream->StreamID()));
|
||||
|
||||
// This will result in Close() being called
|
||||
NS_ABORT_IF_FALSE(!mNeedsCleanup, "mNeedsCleanup unexpectedly set");
|
||||
mNeedsCleanup = mInputFrameDataStream;
|
||||
ResetDownstreamState();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Modified methods of nsAHttpConnection
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -191,6 +191,7 @@ private:
|
|||
void ProcessPending();
|
||||
nsresult SetInputFrameDataStream(PRUint32);
|
||||
bool VerifyStream(SpdyStream *, PRUint32);
|
||||
void SetNeedsCleanup();
|
||||
|
||||
// a wrapper for all calls to the nshttpconnection level segment writer. Used
|
||||
// to track network I/O for timeout purposes
|
||||
|
|
Загрузка…
Ссылка в новой задаче