mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 378637 part 3 - fix http style: comments, whitespace, formatters r=hurley
--HG-- extra : rebase_source : 9d2b0692298fca2655023b3bc6295386a96625e6
This commit is contained in:
parent
9d67ad9905
commit
f8a53af3a1
@ -66,39 +66,39 @@ do { \
|
|||||||
Http2Session::Http2Session(nsAHttpTransaction *aHttpTransaction,
|
Http2Session::Http2Session(nsAHttpTransaction *aHttpTransaction,
|
||||||
nsISocketTransport *aSocketTransport,
|
nsISocketTransport *aSocketTransport,
|
||||||
int32_t firstPriority)
|
int32_t firstPriority)
|
||||||
: mSocketTransport(aSocketTransport),
|
: mSocketTransport(aSocketTransport)
|
||||||
mSegmentReader(nullptr),
|
, mSegmentReader(nullptr)
|
||||||
mSegmentWriter(nullptr),
|
, mSegmentWriter(nullptr)
|
||||||
mNextStreamID(3), // 1 is reserved for Updgrade handshakes
|
, mNextStreamID(3) // 1 is reserved for Updgrade handshakes
|
||||||
mConcurrentHighWater(0),
|
, mConcurrentHighWater(0)
|
||||||
mDownstreamState(BUFFERING_OPENING_SETTINGS),
|
, mDownstreamState(BUFFERING_OPENING_SETTINGS)
|
||||||
mInputFrameBufferSize(kDefaultBufferSize),
|
, mInputFrameBufferSize(kDefaultBufferSize)
|
||||||
mInputFrameBufferUsed(0),
|
, mInputFrameBufferUsed(0)
|
||||||
mInputFrameFinal(false),
|
, mInputFrameFinal(false)
|
||||||
mInputFrameDataStream(nullptr),
|
, mInputFrameDataStream(nullptr)
|
||||||
mNeedsCleanup(nullptr),
|
, mNeedsCleanup(nullptr)
|
||||||
mDownstreamRstReason(NO_HTTP_ERROR),
|
, mDownstreamRstReason(NO_HTTP_ERROR)
|
||||||
mExpectedHeaderID(0),
|
, mExpectedHeaderID(0)
|
||||||
mExpectedPushPromiseID(0),
|
, mExpectedPushPromiseID(0)
|
||||||
mContinuedPromiseStream(0),
|
, mContinuedPromiseStream(0)
|
||||||
mShouldGoAway(false),
|
, mShouldGoAway(false)
|
||||||
mClosed(false),
|
, mClosed(false)
|
||||||
mCleanShutdown(false),
|
, mCleanShutdown(false)
|
||||||
mTLSProfileConfirmed(false),
|
, mTLSProfileConfirmed(false)
|
||||||
mGoAwayReason(NO_HTTP_ERROR),
|
, mGoAwayReason(NO_HTTP_ERROR)
|
||||||
mGoAwayID(0),
|
, mGoAwayID(0)
|
||||||
mOutgoingGoAwayID(0),
|
, mOutgoingGoAwayID(0)
|
||||||
mMaxConcurrent(kDefaultMaxConcurrent),
|
, mMaxConcurrent(kDefaultMaxConcurrent)
|
||||||
mConcurrent(0),
|
, mConcurrent(0)
|
||||||
mServerPushedResources(0),
|
, mServerPushedResources(0)
|
||||||
mServerInitialStreamWindow(kDefaultRwin),
|
, mServerInitialStreamWindow(kDefaultRwin)
|
||||||
mLocalSessionWindow(kDefaultRwin),
|
, mLocalSessionWindow(kDefaultRwin)
|
||||||
mServerSessionWindow(kDefaultRwin),
|
, mServerSessionWindow(kDefaultRwin)
|
||||||
mOutputQueueSize(kDefaultQueueSize),
|
, mOutputQueueSize(kDefaultQueueSize)
|
||||||
mOutputQueueUsed(0),
|
, mOutputQueueUsed(0)
|
||||||
mOutputQueueSent(0),
|
, mOutputQueueSent(0)
|
||||||
mLastReadEpoch(PR_IntervalNow()),
|
, mLastReadEpoch(PR_IntervalNow())
|
||||||
mPingSentEpoch(0)
|
, mPingSentEpoch(0)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
@ -552,7 +552,7 @@ Http2Session::ChangeDownstreamState(enum internalStateType newState)
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
LOG3(("Http2Stream::ChangeDownstreamState() %p from %X to %X",
|
LOG3(("Http2Session::ChangeDownstreamState() %p from %X to %X",
|
||||||
this, mDownstreamState, newState));
|
this, mDownstreamState, newState));
|
||||||
mDownstreamState = newState;
|
mDownstreamState = newState;
|
||||||
}
|
}
|
||||||
@ -562,7 +562,7 @@ Http2Session::ResetDownstreamState()
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
LOG3(("Http2Stream::ResetDownstreamState() %p", this));
|
LOG3(("Http2Session::ResetDownstreamState() %p", this));
|
||||||
ChangeDownstreamState(BUFFERING_FRAME_HEADER);
|
ChangeDownstreamState(BUFFERING_FRAME_HEADER);
|
||||||
|
|
||||||
if (mInputFrameFinal && mInputFrameDataStream) {
|
if (mInputFrameFinal && mInputFrameDataStream) {
|
||||||
|
@ -39,34 +39,34 @@ namespace net {
|
|||||||
Http2Stream::Http2Stream(nsAHttpTransaction *httpTransaction,
|
Http2Stream::Http2Stream(nsAHttpTransaction *httpTransaction,
|
||||||
Http2Session *session,
|
Http2Session *session,
|
||||||
int32_t priority)
|
int32_t priority)
|
||||||
: mStreamID(0),
|
: mStreamID(0)
|
||||||
mSession(session),
|
, mSession(session)
|
||||||
mUpstreamState(GENERATING_HEADERS),
|
, mUpstreamState(GENERATING_HEADERS)
|
||||||
mState(IDLE),
|
, mState(IDLE)
|
||||||
mAllHeadersSent(0),
|
, mAllHeadersSent(0)
|
||||||
mAllHeadersReceived(0),
|
, mAllHeadersReceived(0)
|
||||||
mTransaction(httpTransaction),
|
, mTransaction(httpTransaction)
|
||||||
mSocketTransport(session->SocketTransport()),
|
, mSocketTransport(session->SocketTransport())
|
||||||
mSegmentReader(nullptr),
|
, mSegmentReader(nullptr)
|
||||||
mSegmentWriter(nullptr),
|
, mSegmentWriter(nullptr)
|
||||||
mChunkSize(session->SendingChunkSize()),
|
, mChunkSize(session->SendingChunkSize())
|
||||||
mRequestBlockedOnRead(0),
|
, mRequestBlockedOnRead(0)
|
||||||
mRecvdFin(0),
|
, mRecvdFin(0)
|
||||||
mRecvdReset(0),
|
, mRecvdReset(0)
|
||||||
mSentReset(0),
|
, mSentReset(0)
|
||||||
mCountAsActive(0),
|
, mCountAsActive(0)
|
||||||
mSentFin(0),
|
, mSentFin(0)
|
||||||
mSentWaitingFor(0),
|
, mSentWaitingFor(0)
|
||||||
mSetTCPSocketBuffer(0),
|
, mSetTCPSocketBuffer(0)
|
||||||
mTxInlineFrameSize(Http2Session::kDefaultBufferSize),
|
, mTxInlineFrameSize(Http2Session::kDefaultBufferSize)
|
||||||
mTxInlineFrameUsed(0),
|
, mTxInlineFrameUsed(0)
|
||||||
mTxStreamFrameSize(0),
|
, mTxStreamFrameSize(0)
|
||||||
mRequestBodyLenRemaining(0),
|
, mRequestBodyLenRemaining(0)
|
||||||
mLocalUnacked(0),
|
, mLocalUnacked(0)
|
||||||
mBlockedOnRwin(false),
|
, mBlockedOnRwin(false)
|
||||||
mTotalSent(0),
|
, mTotalSent(0)
|
||||||
mTotalRead(0),
|
, mTotalRead(0)
|
||||||
mPushSource(nullptr)
|
, mPushSource(nullptr)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
|
@ -45,34 +45,34 @@ NS_INTERFACE_MAP_BEGIN(SpdySession3)
|
|||||||
NS_INTERFACE_MAP_END
|
NS_INTERFACE_MAP_END
|
||||||
|
|
||||||
SpdySession3::SpdySession3(nsAHttpTransaction *aHttpTransaction,
|
SpdySession3::SpdySession3(nsAHttpTransaction *aHttpTransaction,
|
||||||
nsISocketTransport *aSocketTransport,
|
nsISocketTransport *aSocketTransport,
|
||||||
int32_t firstPriority)
|
int32_t firstPriority)
|
||||||
: mSocketTransport(aSocketTransport),
|
: mSocketTransport(aSocketTransport)
|
||||||
mSegmentReader(nullptr),
|
, mSegmentReader(nullptr)
|
||||||
mSegmentWriter(nullptr),
|
, mSegmentWriter(nullptr)
|
||||||
mNextStreamID(1),
|
, mNextStreamID(1)
|
||||||
mConcurrentHighWater(0),
|
, mConcurrentHighWater(0)
|
||||||
mDownstreamState(BUFFERING_FRAME_HEADER),
|
, mDownstreamState(BUFFERING_FRAME_HEADER)
|
||||||
mInputFrameBufferSize(kDefaultBufferSize),
|
, mInputFrameBufferSize(kDefaultBufferSize)
|
||||||
mInputFrameBufferUsed(0),
|
, mInputFrameBufferUsed(0)
|
||||||
mInputFrameDataLast(false),
|
, mInputFrameDataLast(false)
|
||||||
mInputFrameDataStream(nullptr),
|
, mInputFrameDataStream(nullptr)
|
||||||
mNeedsCleanup(nullptr),
|
, mNeedsCleanup(nullptr)
|
||||||
mShouldGoAway(false),
|
, mShouldGoAway(false)
|
||||||
mClosed(false),
|
, mClosed(false)
|
||||||
mCleanShutdown(false),
|
, mCleanShutdown(false)
|
||||||
mDataPending(false),
|
, mDataPending(false)
|
||||||
mGoAwayID(0),
|
, mGoAwayID(0)
|
||||||
mMaxConcurrent(kDefaultMaxConcurrent),
|
, mMaxConcurrent(kDefaultMaxConcurrent)
|
||||||
mConcurrent(0),
|
, mConcurrent(0)
|
||||||
mServerPushedResources(0),
|
, mServerPushedResources(0)
|
||||||
mServerInitialWindow(kDefaultServerRwin),
|
, mServerInitialWindow(kDefaultServerRwin)
|
||||||
mOutputQueueSize(kDefaultQueueSize),
|
, mOutputQueueSize(kDefaultQueueSize)
|
||||||
mOutputQueueUsed(0),
|
, mOutputQueueUsed(0)
|
||||||
mOutputQueueSent(0),
|
, mOutputQueueSent(0)
|
||||||
mLastReadEpoch(PR_IntervalNow()),
|
, mLastReadEpoch(PR_IntervalNow())
|
||||||
mPingSentEpoch(0),
|
, mPingSentEpoch(0)
|
||||||
mNextPingID(1)
|
, mNextPingID(1)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
@ -100,8 +100,8 @@ SpdySession3::SpdySession3(nsAHttpTransaction *aHttpTransaction,
|
|||||||
|
|
||||||
PLDHashOperator
|
PLDHashOperator
|
||||||
SpdySession3::ShutdownEnumerator(nsAHttpTransaction *key,
|
SpdySession3::ShutdownEnumerator(nsAHttpTransaction *key,
|
||||||
nsAutoPtr<SpdyStream3> &stream,
|
nsAutoPtr<SpdyStream3> &stream,
|
||||||
void *closure)
|
void *closure)
|
||||||
{
|
{
|
||||||
SpdySession3 *self = static_cast<SpdySession3 *>(closure);
|
SpdySession3 *self = static_cast<SpdySession3 *>(closure);
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ SpdySession3::~SpdySession3()
|
|||||||
|
|
||||||
void
|
void
|
||||||
SpdySession3::LogIO(SpdySession3 *self, SpdyStream3 *stream, const char *label,
|
SpdySession3::LogIO(SpdySession3 *self, SpdyStream3 *stream, const char *label,
|
||||||
const char *data, uint32_t datalen)
|
const char *data, uint32_t datalen)
|
||||||
{
|
{
|
||||||
if (!LOG4_ENABLED())
|
if (!LOG4_ENABLED())
|
||||||
return;
|
return;
|
||||||
@ -340,7 +340,7 @@ SpdySession3::RegisterStreamID(SpdyStream3 *stream, uint32_t aNewID)
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
SpdySession3::AddStream(nsAHttpTransaction *aHttpTransaction,
|
SpdySession3::AddStream(nsAHttpTransaction *aHttpTransaction,
|
||||||
int32_t aPriority)
|
int32_t aPriority)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
@ -420,7 +420,7 @@ SpdySession3::ProcessPending()
|
|||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SpdySession3::NetworkRead(nsAHttpSegmentWriter *writer, char *buf,
|
SpdySession3::NetworkRead(nsAHttpSegmentWriter *writer, char *buf,
|
||||||
uint32_t count, uint32_t *countWritten)
|
uint32_t count, uint32_t *countWritten)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
@ -510,7 +510,7 @@ SpdySession3::ChangeDownstreamState(enum stateType newState)
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
LOG3(("SpdyStream3::ChangeDownstreamState() %p from %X to %X",
|
LOG3(("SpdySession3::ChangeDownstreamState() %p from %X to %X",
|
||||||
this, mDownstreamState, newState));
|
this, mDownstreamState, newState));
|
||||||
mDownstreamState = newState;
|
mDownstreamState = newState;
|
||||||
}
|
}
|
||||||
@ -520,7 +520,7 @@ SpdySession3::ResetDownstreamState()
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
LOG3(("SpdyStream3::ResetDownstreamState() %p", this));
|
LOG3(("SpdySession3::ResetDownstreamState() %p", this));
|
||||||
ChangeDownstreamState(BUFFERING_FRAME_HEADER);
|
ChangeDownstreamState(BUFFERING_FRAME_HEADER);
|
||||||
|
|
||||||
if (mInputFrameDataLast && mInputFrameDataStream) {
|
if (mInputFrameDataLast && mInputFrameDataStream) {
|
||||||
@ -844,7 +844,7 @@ SpdySession3::VerifyStream(SpdyStream3 *aStream, uint32_t aOptionalID = 0)
|
|||||||
|
|
||||||
void
|
void
|
||||||
SpdySession3::CleanupStream(SpdyStream3 *aStream, nsresult aResult,
|
SpdySession3::CleanupStream(SpdyStream3 *aStream, nsresult aResult,
|
||||||
rstReason aResetCode)
|
rstReason aResetCode)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
LOG3(("SpdySession3::CleanupStream %p %p 0x%X %X\n",
|
LOG3(("SpdySession3::CleanupStream %p %p 0x%X %X\n",
|
||||||
@ -1640,8 +1640,8 @@ SpdySession3::HandleCredential(SpdySession3 *self)
|
|||||||
|
|
||||||
void
|
void
|
||||||
SpdySession3::OnTransportStatus(nsITransport* aTransport,
|
SpdySession3::OnTransportStatus(nsITransport* aTransport,
|
||||||
nsresult aStatus,
|
nsresult aStatus,
|
||||||
uint64_t aProgress)
|
uint64_t aProgress)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
@ -1696,8 +1696,8 @@ SpdySession3::OnTransportStatus(nsITransport* aTransport,
|
|||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SpdySession3::ReadSegments(nsAHttpSegmentReader *reader,
|
SpdySession3::ReadSegments(nsAHttpSegmentReader *reader,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
uint32_t *countRead)
|
uint32_t *countRead)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
@ -1802,8 +1802,8 @@ SpdySession3::ReadSegments(nsAHttpSegmentReader *reader,
|
|||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SpdySession3::WriteSegments(nsAHttpSegmentWriter *writer,
|
SpdySession3::WriteSegments(nsAHttpSegmentWriter *writer,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
uint32_t *countWritten)
|
uint32_t *countWritten)
|
||||||
{
|
{
|
||||||
typedef nsresult (*Control_FX) (SpdySession3 *self);
|
typedef nsresult (*Control_FX) (SpdySession3 *self);
|
||||||
static const Control_FX sControlFunctions[] =
|
static const Control_FX sControlFunctions[] =
|
||||||
@ -2240,7 +2240,7 @@ SpdySession3::Close(nsresult aReason)
|
|||||||
|
|
||||||
void
|
void
|
||||||
SpdySession3::CloseTransaction(nsAHttpTransaction *aTransaction,
|
SpdySession3::CloseTransaction(nsAHttpTransaction *aTransaction,
|
||||||
nsresult aResult)
|
nsresult aResult)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
LOG3(("SpdySession3::CloseTransaction %p %p %x", this, aTransaction, aResult));
|
LOG3(("SpdySession3::CloseTransaction %p %p %x", this, aTransaction, aResult));
|
||||||
@ -2268,8 +2268,8 @@ SpdySession3::CloseTransaction(nsAHttpTransaction *aTransaction,
|
|||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SpdySession3::OnReadSegment(const char *buf,
|
SpdySession3::OnReadSegment(const char *buf,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
uint32_t *countRead)
|
uint32_t *countRead)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
@ -2365,8 +2365,8 @@ SpdySession3::CommitToSegmentSize(uint32_t count, bool forceCommitment)
|
|||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SpdySession3::OnWriteSegment(char *buf,
|
SpdySession3::OnWriteSegment(char *buf,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
uint32_t *countWritten)
|
uint32_t *countWritten)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
@ -2509,8 +2509,8 @@ SpdySession3::IsPersistent()
|
|||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SpdySession3::TakeTransport(nsISocketTransport **,
|
SpdySession3::TakeTransport(nsISocketTransport **,
|
||||||
nsIAsyncInputStream **,
|
nsIAsyncInputStream **,
|
||||||
nsIAsyncOutputStream **)
|
nsIAsyncOutputStream **)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(false, "TakeTransport of SpdySession3");
|
MOZ_ASSERT(false, "TakeTransport of SpdySession3");
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
@ -2695,9 +2695,9 @@ SpdySession3::Connection()
|
|||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SpdySession3::OnHeadersAvailable(nsAHttpTransaction *transaction,
|
SpdySession3::OnHeadersAvailable(nsAHttpTransaction *transaction,
|
||||||
nsHttpRequestHead *requestHead,
|
nsHttpRequestHead *requestHead,
|
||||||
nsHttpResponseHead *responseHead,
|
nsHttpResponseHead *responseHead,
|
||||||
bool *reset)
|
bool *reset)
|
||||||
{
|
{
|
||||||
return mConnection->OnHeadersAvailable(transaction,
|
return mConnection->OnHeadersAvailable(transaction,
|
||||||
requestHead,
|
requestHead,
|
||||||
|
@ -48,34 +48,34 @@ NS_INTERFACE_MAP_END
|
|||||||
SpdySession31::SpdySession31(nsAHttpTransaction *aHttpTransaction,
|
SpdySession31::SpdySession31(nsAHttpTransaction *aHttpTransaction,
|
||||||
nsISocketTransport *aSocketTransport,
|
nsISocketTransport *aSocketTransport,
|
||||||
int32_t firstPriority)
|
int32_t firstPriority)
|
||||||
: mSocketTransport(aSocketTransport),
|
: mSocketTransport(aSocketTransport)
|
||||||
mSegmentReader(nullptr),
|
, mSegmentReader(nullptr)
|
||||||
mSegmentWriter(nullptr),
|
, mSegmentWriter(nullptr)
|
||||||
mNextStreamID(1),
|
, mNextStreamID(1)
|
||||||
mConcurrentHighWater(0),
|
, mConcurrentHighWater(0)
|
||||||
mDownstreamState(BUFFERING_FRAME_HEADER),
|
, mDownstreamState(BUFFERING_FRAME_HEADER)
|
||||||
mInputFrameBufferSize(kDefaultBufferSize),
|
, mInputFrameBufferSize(kDefaultBufferSize)
|
||||||
mInputFrameBufferUsed(0),
|
, mInputFrameBufferUsed(0)
|
||||||
mInputFrameDataLast(false),
|
, mInputFrameDataLast(false)
|
||||||
mInputFrameDataStream(nullptr),
|
, mInputFrameDataStream(nullptr)
|
||||||
mNeedsCleanup(nullptr),
|
, mNeedsCleanup(nullptr)
|
||||||
mShouldGoAway(false),
|
, mShouldGoAway(false)
|
||||||
mClosed(false),
|
, mClosed(false)
|
||||||
mCleanShutdown(false),
|
, mCleanShutdown(false)
|
||||||
mDataPending(false),
|
, mDataPending(false)
|
||||||
mGoAwayID(0),
|
, mGoAwayID(0)
|
||||||
mMaxConcurrent(kDefaultMaxConcurrent),
|
, mMaxConcurrent(kDefaultMaxConcurrent)
|
||||||
mConcurrent(0),
|
, mConcurrent(0)
|
||||||
mServerPushedResources(0),
|
, mServerPushedResources(0)
|
||||||
mServerInitialStreamWindow(kDefaultRwin),
|
, mServerInitialStreamWindow(kDefaultRwin)
|
||||||
mLocalSessionWindow(kDefaultRwin),
|
, mLocalSessionWindow(kDefaultRwin)
|
||||||
mRemoteSessionWindow(kDefaultRwin),
|
, mRemoteSessionWindow(kDefaultRwin)
|
||||||
mOutputQueueSize(kDefaultQueueSize),
|
, mOutputQueueSize(kDefaultQueueSize)
|
||||||
mOutputQueueUsed(0),
|
, mOutputQueueUsed(0)
|
||||||
mOutputQueueSent(0),
|
, mOutputQueueSent(0)
|
||||||
mLastReadEpoch(PR_IntervalNow()),
|
, mLastReadEpoch(PR_IntervalNow())
|
||||||
mPingSentEpoch(0),
|
, mPingSentEpoch(0)
|
||||||
mNextPingID(1)
|
, mNextPingID(1)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
@ -103,9 +103,9 @@ SpdySession31::SpdySession31(nsAHttpTransaction *aHttpTransaction,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PLDHashOperator
|
PLDHashOperator
|
||||||
SpdySession31::ShutdownEnumerator(nsAHttpTransaction *key,
|
SpdySession31::ShutdownEnumerator(nsAHttpTransaction *key,
|
||||||
nsAutoPtr<SpdyStream31> &stream,
|
nsAutoPtr<SpdyStream31> &stream,
|
||||||
void *closure)
|
void *closure)
|
||||||
{
|
{
|
||||||
SpdySession31 *self = static_cast<SpdySession31 *>(closure);
|
SpdySession31 *self = static_cast<SpdySession31 *>(closure);
|
||||||
|
|
||||||
@ -515,7 +515,7 @@ SpdySession31::ChangeDownstreamState(enum stateType newState)
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
LOG3(("SpdyStream31::ChangeDownstreamState() %p from %X to %X",
|
LOG3(("SpdySession31::ChangeDownstreamState() %p from %X to %X",
|
||||||
this, mDownstreamState, newState));
|
this, mDownstreamState, newState));
|
||||||
mDownstreamState = newState;
|
mDownstreamState = newState;
|
||||||
}
|
}
|
||||||
@ -525,7 +525,7 @@ SpdySession31::ResetDownstreamState()
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
LOG3(("SpdyStream31::ResetDownstreamState() %p", this));
|
LOG3(("SpdySession31::ResetDownstreamState() %p", this));
|
||||||
ChangeDownstreamState(BUFFERING_FRAME_HEADER);
|
ChangeDownstreamState(BUFFERING_FRAME_HEADER);
|
||||||
|
|
||||||
if (mInputFrameDataLast && mInputFrameDataStream) {
|
if (mInputFrameDataLast && mInputFrameDataStream) {
|
||||||
|
@ -25,9 +25,9 @@ class SpdyPushedStream31;
|
|||||||
class SpdyStream31;
|
class SpdyStream31;
|
||||||
|
|
||||||
class SpdySession31 MOZ_FINAL : public ASpdySession
|
class SpdySession31 MOZ_FINAL : public ASpdySession
|
||||||
, public nsAHttpConnection
|
, public nsAHttpConnection
|
||||||
, public nsAHttpSegmentReader
|
, public nsAHttpSegmentReader
|
||||||
, public nsAHttpSegmentWriter
|
, public nsAHttpSegmentWriter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
@ -38,38 +38,38 @@ namespace mozilla {
|
|||||||
namespace net {
|
namespace net {
|
||||||
|
|
||||||
SpdyStream3::SpdyStream3(nsAHttpTransaction *httpTransaction,
|
SpdyStream3::SpdyStream3(nsAHttpTransaction *httpTransaction,
|
||||||
SpdySession3 *spdySession,
|
SpdySession3 *spdySession,
|
||||||
int32_t priority)
|
int32_t priority)
|
||||||
: mStreamID(0),
|
: mStreamID(0)
|
||||||
mSession(spdySession),
|
, mSession(spdySession)
|
||||||
mUpstreamState(GENERATING_SYN_STREAM),
|
, mUpstreamState(GENERATING_SYN_STREAM)
|
||||||
mSynFrameComplete(0),
|
, mSynFrameComplete(0)
|
||||||
mSentFinOnData(0),
|
, mSentFinOnData(0)
|
||||||
mTransaction(httpTransaction),
|
, mTransaction(httpTransaction)
|
||||||
mSocketTransport(spdySession->SocketTransport()),
|
, mSocketTransport(spdySession->SocketTransport())
|
||||||
mSegmentReader(nullptr),
|
, mSegmentReader(nullptr)
|
||||||
mSegmentWriter(nullptr),
|
, mSegmentWriter(nullptr)
|
||||||
mChunkSize(spdySession->SendingChunkSize()),
|
, mChunkSize(spdySession->SendingChunkSize())
|
||||||
mRequestBlockedOnRead(0),
|
, mRequestBlockedOnRead(0)
|
||||||
mRecvdFin(0),
|
, mRecvdFin(0)
|
||||||
mFullyOpen(0),
|
, mFullyOpen(0)
|
||||||
mSentWaitingFor(0),
|
, mSentWaitingFor(0)
|
||||||
mReceivedData(0),
|
, mReceivedData(0)
|
||||||
mSetTCPSocketBuffer(0),
|
, mSetTCPSocketBuffer(0)
|
||||||
mTxInlineFrameSize(SpdySession3::kDefaultBufferSize),
|
, mTxInlineFrameSize(SpdySession3::kDefaultBufferSize)
|
||||||
mTxInlineFrameUsed(0),
|
, mTxInlineFrameUsed(0)
|
||||||
mTxStreamFrameSize(0),
|
, mTxStreamFrameSize(0)
|
||||||
mZlib(spdySession->UpstreamZlib()),
|
, mZlib(spdySession->UpstreamZlib())
|
||||||
mDecompressBufferSize(SpdySession3::kDefaultBufferSize),
|
, mDecompressBufferSize(SpdySession3::kDefaultBufferSize)
|
||||||
mDecompressBufferUsed(0),
|
, mDecompressBufferUsed(0)
|
||||||
mDecompressedBytes(0),
|
, mDecompressedBytes(0)
|
||||||
mRequestBodyLenRemaining(0),
|
, mRequestBodyLenRemaining(0)
|
||||||
mPriority(priority),
|
, mPriority(priority)
|
||||||
mLocalUnacked(0),
|
, mLocalUnacked(0)
|
||||||
mBlockedOnRwin(false),
|
, mBlockedOnRwin(false)
|
||||||
mTotalSent(0),
|
, mTotalSent(0)
|
||||||
mTotalRead(0),
|
, mTotalRead(0)
|
||||||
mPushSource(nullptr)
|
, mPushSource(nullptr)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
@ -189,9 +189,8 @@ SpdyStream3::ReadSegments(nsAHttpSegmentReader *reader,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WriteSegments() is used to read data off the socket. Generally this is
|
// WriteSegments() is used to read data off the socket. Generally this is
|
||||||
// just the SPDY frame header and from there the appropriate SPDYStream
|
// just a call through to the associate nsHttpTransaciton for this stream
|
||||||
// is identified from the Stream-ID. The http transaction associated with
|
// for the remaining data bytes indicated by the current DATA frame.
|
||||||
// that read then pulls in the data directly.
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SpdyStream3::WriteSegments(nsAHttpSegmentWriter *writer,
|
SpdyStream3::WriteSegments(nsAHttpSegmentWriter *writer,
|
||||||
@ -1343,8 +1342,8 @@ SpdyStream3::UpdateRemoteWindow(int32_t delta)
|
|||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SpdyStream3::OnReadSegment(const char *buf,
|
SpdyStream3::OnReadSegment(const char *buf,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
uint32_t *countRead)
|
uint32_t *countRead)
|
||||||
{
|
{
|
||||||
LOG3(("SpdyStream3::OnReadSegment %p count=%d state=%x",
|
LOG3(("SpdyStream3::OnReadSegment %p count=%d state=%x",
|
||||||
this, count, mUpstreamState));
|
this, count, mUpstreamState));
|
||||||
|
@ -38,36 +38,36 @@ namespace net {
|
|||||||
SpdyStream31::SpdyStream31(nsAHttpTransaction *httpTransaction,
|
SpdyStream31::SpdyStream31(nsAHttpTransaction *httpTransaction,
|
||||||
SpdySession31 *spdySession,
|
SpdySession31 *spdySession,
|
||||||
int32_t priority)
|
int32_t priority)
|
||||||
: mStreamID(0),
|
: mStreamID(0)
|
||||||
mSession(spdySession),
|
, mSession(spdySession)
|
||||||
mUpstreamState(GENERATING_SYN_STREAM),
|
, mUpstreamState(GENERATING_SYN_STREAM)
|
||||||
mSynFrameComplete(0),
|
, mSynFrameComplete(0)
|
||||||
mSentFinOnData(0),
|
, mSentFinOnData(0)
|
||||||
mTransaction(httpTransaction),
|
, mTransaction(httpTransaction)
|
||||||
mSocketTransport(spdySession->SocketTransport()),
|
, mSocketTransport(spdySession->SocketTransport())
|
||||||
mSegmentReader(nullptr),
|
, mSegmentReader(nullptr)
|
||||||
mSegmentWriter(nullptr),
|
, mSegmentWriter(nullptr)
|
||||||
mChunkSize(spdySession->SendingChunkSize()),
|
, mChunkSize(spdySession->SendingChunkSize())
|
||||||
mRequestBlockedOnRead(0),
|
, mRequestBlockedOnRead(0)
|
||||||
mRecvdFin(0),
|
, mRecvdFin(0)
|
||||||
mFullyOpen(0),
|
, mFullyOpen(0)
|
||||||
mSentWaitingFor(0),
|
, mSentWaitingFor(0)
|
||||||
mReceivedData(0),
|
, mReceivedData(0)
|
||||||
mSetTCPSocketBuffer(0),
|
, mSetTCPSocketBuffer(0)
|
||||||
mTxInlineFrameSize(SpdySession31::kDefaultBufferSize),
|
, mTxInlineFrameSize(SpdySession31::kDefaultBufferSize)
|
||||||
mTxInlineFrameUsed(0),
|
, mTxInlineFrameUsed(0)
|
||||||
mTxStreamFrameSize(0),
|
, mTxStreamFrameSize(0)
|
||||||
mZlib(spdySession->UpstreamZlib()),
|
, mZlib(spdySession->UpstreamZlib())
|
||||||
mDecompressBufferSize(SpdySession31::kDefaultBufferSize),
|
, mDecompressBufferSize(SpdySession31::kDefaultBufferSize)
|
||||||
mDecompressBufferUsed(0),
|
, mDecompressBufferUsed(0)
|
||||||
mDecompressedBytes(0),
|
, mDecompressedBytes(0)
|
||||||
mRequestBodyLenRemaining(0),
|
, mRequestBodyLenRemaining(0)
|
||||||
mPriority(priority),
|
, mPriority(priority)
|
||||||
mLocalUnacked(0),
|
, mLocalUnacked(0)
|
||||||
mBlockedOnRwin(false),
|
, mBlockedOnRwin(false)
|
||||||
mTotalSent(0),
|
, mTotalSent(0)
|
||||||
mTotalRead(0),
|
, mTotalRead(0)
|
||||||
mPushSource(nullptr)
|
, mPushSource(nullptr)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||||
|
|
||||||
@ -194,9 +194,8 @@ SpdyStream31::ReadSegments(nsAHttpSegmentReader *reader,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WriteSegments() is used to read data off the socket. Generally this is
|
// WriteSegments() is used to read data off the socket. Generally this is
|
||||||
// just the SPDY frame header and from there the appropriate SPDYStream
|
// just a call through to the associate nsHttpTransaciton for this stream
|
||||||
// is identified from the Stream-ID. The http transaction associated with
|
// for the remaining data bytes indicated by the current DATA frame.
|
||||||
// that read then pulls in the data directly.
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SpdyStream31::WriteSegments(nsAHttpSegmentWriter *writer,
|
SpdyStream31::WriteSegments(nsAHttpSegmentWriter *writer,
|
||||||
|
@ -78,7 +78,7 @@ nsHttpConnection::nsHttpConnection()
|
|||||||
, mResponseTimeoutEnabled(false)
|
, mResponseTimeoutEnabled(false)
|
||||||
, mTCPKeepaliveConfig(kTCPKeepaliveDisabled)
|
, mTCPKeepaliveConfig(kTCPKeepaliveDisabled)
|
||||||
{
|
{
|
||||||
LOG(("Creating nsHttpConnection @%x\n", this));
|
LOG(("Creating nsHttpConnection @%p\n", this));
|
||||||
|
|
||||||
// the default timeout is for when this connection has not yet processed a
|
// the default timeout is for when this connection has not yet processed a
|
||||||
// transaction
|
// transaction
|
||||||
@ -89,7 +89,7 @@ nsHttpConnection::nsHttpConnection()
|
|||||||
|
|
||||||
nsHttpConnection::~nsHttpConnection()
|
nsHttpConnection::~nsHttpConnection()
|
||||||
{
|
{
|
||||||
LOG(("Destroying nsHttpConnection @%x\n", this));
|
LOG(("Destroying nsHttpConnection @%p\n", this));
|
||||||
|
|
||||||
if (!mEverUsedSpdy) {
|
if (!mEverUsedSpdy) {
|
||||||
LOG(("nsHttpConnection %p performed %d HTTP/1.x transactions\n",
|
LOG(("nsHttpConnection %p performed %d HTTP/1.x transactions\n",
|
||||||
@ -1247,7 +1247,7 @@ nsHttpConnection::EndIdleMonitoring()
|
|||||||
void
|
void
|
||||||
nsHttpConnection::CloseTransaction(nsAHttpTransaction *trans, nsresult reason)
|
nsHttpConnection::CloseTransaction(nsAHttpTransaction *trans, nsresult reason)
|
||||||
{
|
{
|
||||||
LOG(("nsHttpConnection::CloseTransaction[this=%p trans=%x reason=%x]\n",
|
LOG(("nsHttpConnection::CloseTransaction[this=%p trans=%p reason=%x]\n",
|
||||||
this, trans, reason));
|
this, trans, reason));
|
||||||
|
|
||||||
MOZ_ASSERT(trans == mTransaction, "wrong transaction");
|
MOZ_ASSERT(trans == mTransaction, "wrong transaction");
|
||||||
|
@ -73,28 +73,30 @@ public:
|
|||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// XXX document when these are ok to call
|
// XXX document when these are ok to call
|
||||||
|
|
||||||
bool SupportsPipelining();
|
bool SupportsPipelining();
|
||||||
bool IsKeepAlive() { return mUsingSpdyVersion ||
|
bool IsKeepAlive()
|
||||||
(mKeepAliveMask && mKeepAlive); }
|
{
|
||||||
bool CanReuse(); // can this connection be reused?
|
return mUsingSpdyVersion || (mKeepAliveMask && mKeepAlive);
|
||||||
bool CanDirectlyActivate();
|
}
|
||||||
|
bool CanReuse(); // can this connection be reused?
|
||||||
|
bool CanDirectlyActivate();
|
||||||
|
|
||||||
// Returns time in seconds for how long connection can be reused.
|
// Returns time in seconds for how long connection can be reused.
|
||||||
uint32_t TimeToLive();
|
uint32_t TimeToLive();
|
||||||
|
|
||||||
void DontReuse();
|
void DontReuse();
|
||||||
|
|
||||||
bool IsProxyConnectInProgress()
|
bool IsProxyConnectInProgress()
|
||||||
{
|
{
|
||||||
return mProxyConnectInProgress;
|
return mProxyConnectInProgress;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LastTransactionExpectedNoContent()
|
bool LastTransactionExpectedNoContent()
|
||||||
{
|
{
|
||||||
return mLastTransactionExpectedNoContent;
|
return mLastTransactionExpectedNoContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetLastTransactionExpectedNoContent(bool val)
|
void SetLastTransactionExpectedNoContent(bool val)
|
||||||
{
|
{
|
||||||
mLastTransactionExpectedNoContent = val;
|
mLastTransactionExpectedNoContent = val;
|
||||||
}
|
}
|
||||||
|
@ -86,12 +86,12 @@ nsHttpConnectionMgr::nsHttpConnectionMgr()
|
|||||||
, mTimeoutTickArmed(false)
|
, mTimeoutTickArmed(false)
|
||||||
, mTimeoutTickNext(1)
|
, mTimeoutTickNext(1)
|
||||||
{
|
{
|
||||||
LOG(("Creating nsHttpConnectionMgr @%x\n", this));
|
LOG(("Creating nsHttpConnectionMgr @%p\n", this));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsHttpConnectionMgr::~nsHttpConnectionMgr()
|
nsHttpConnectionMgr::~nsHttpConnectionMgr()
|
||||||
{
|
{
|
||||||
LOG(("Destroying nsHttpConnectionMgr @%x\n", this));
|
LOG(("Destroying nsHttpConnectionMgr @%p\n", this));
|
||||||
if (mTimeoutTick)
|
if (mTimeoutTick)
|
||||||
mTimeoutTick->Cancel();
|
mTimeoutTick->Cancel();
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ nsHttpConnectionMgr::Observe(nsISupports *subject,
|
|||||||
nsresult
|
nsresult
|
||||||
nsHttpConnectionMgr::AddTransaction(nsHttpTransaction *trans, int32_t priority)
|
nsHttpConnectionMgr::AddTransaction(nsHttpTransaction *trans, int32_t priority)
|
||||||
{
|
{
|
||||||
LOG(("nsHttpConnectionMgr::AddTransaction [trans=%x %d]\n", trans, priority));
|
LOG(("nsHttpConnectionMgr::AddTransaction [trans=%p %d]\n", trans, priority));
|
||||||
|
|
||||||
NS_ADDREF(trans);
|
NS_ADDREF(trans);
|
||||||
nsresult rv = PostEvent(&nsHttpConnectionMgr::OnMsgNewTransaction, priority, trans);
|
nsresult rv = PostEvent(&nsHttpConnectionMgr::OnMsgNewTransaction, priority, trans);
|
||||||
@ -298,7 +298,7 @@ nsHttpConnectionMgr::AddTransaction(nsHttpTransaction *trans, int32_t priority)
|
|||||||
nsresult
|
nsresult
|
||||||
nsHttpConnectionMgr::RescheduleTransaction(nsHttpTransaction *trans, int32_t priority)
|
nsHttpConnectionMgr::RescheduleTransaction(nsHttpTransaction *trans, int32_t priority)
|
||||||
{
|
{
|
||||||
LOG(("nsHttpConnectionMgr::RescheduleTransaction [trans=%x %d]\n", trans, priority));
|
LOG(("nsHttpConnectionMgr::RescheduleTransaction [trans=%p %d]\n", trans, priority));
|
||||||
|
|
||||||
NS_ADDREF(trans);
|
NS_ADDREF(trans);
|
||||||
nsresult rv = PostEvent(&nsHttpConnectionMgr::OnMsgReschedTransaction, priority, trans);
|
nsresult rv = PostEvent(&nsHttpConnectionMgr::OnMsgReschedTransaction, priority, trans);
|
||||||
@ -310,7 +310,7 @@ nsHttpConnectionMgr::RescheduleTransaction(nsHttpTransaction *trans, int32_t pri
|
|||||||
nsresult
|
nsresult
|
||||||
nsHttpConnectionMgr::CancelTransaction(nsHttpTransaction *trans, nsresult reason)
|
nsHttpConnectionMgr::CancelTransaction(nsHttpTransaction *trans, nsresult reason)
|
||||||
{
|
{
|
||||||
LOG(("nsHttpConnectionMgr::CancelTransaction [trans=%x reason=%x]\n", trans, reason));
|
LOG(("nsHttpConnectionMgr::CancelTransaction [trans=%p reason=%x]\n", trans, reason));
|
||||||
|
|
||||||
NS_ADDREF(trans);
|
NS_ADDREF(trans);
|
||||||
nsresult rv = PostEvent(&nsHttpConnectionMgr::OnMsgCancelTransaction,
|
nsresult rv = PostEvent(&nsHttpConnectionMgr::OnMsgCancelTransaction,
|
||||||
@ -426,7 +426,7 @@ nsHttpConnectionMgr::GetSocketThreadTarget(nsIEventTarget **target)
|
|||||||
nsresult
|
nsresult
|
||||||
nsHttpConnectionMgr::ReclaimConnection(nsHttpConnection *conn)
|
nsHttpConnectionMgr::ReclaimConnection(nsHttpConnection *conn)
|
||||||
{
|
{
|
||||||
LOG(("nsHttpConnectionMgr::ReclaimConnection [conn=%x]\n", conn));
|
LOG(("nsHttpConnectionMgr::ReclaimConnection [conn=%p]\n", conn));
|
||||||
|
|
||||||
NS_ADDREF(conn);
|
NS_ADDREF(conn);
|
||||||
nsresult rv = PostEvent(&nsHttpConnectionMgr::OnMsgReclaimConnection, 0, conn);
|
nsresult rv = PostEvent(&nsHttpConnectionMgr::OnMsgReclaimConnection, 0, conn);
|
||||||
@ -1601,7 +1601,7 @@ nsHttpConnectionMgr::TryDispatchTransaction(nsConnectionEntry *ent,
|
|||||||
nsRefPtr<nsHttpConnection> conn = GetSpdyPreferredConn(ent);
|
nsRefPtr<nsHttpConnection> conn = GetSpdyPreferredConn(ent);
|
||||||
if (conn) {
|
if (conn) {
|
||||||
if ((caps & NS_HTTP_ALLOW_KEEPALIVE) || !conn->IsExperienced()) {
|
if ((caps & NS_HTTP_ALLOW_KEEPALIVE) || !conn->IsExperienced()) {
|
||||||
LOG((" dispatch to spdy: [conn=%x]\n", conn.get()));
|
LOG((" dispatch to spdy: [conn=%p]\n", conn.get()));
|
||||||
trans->RemoveDispatchedAsBlocking(); /* just in case */
|
trans->RemoveDispatchedAsBlocking(); /* just in case */
|
||||||
DispatchTransaction(ent, trans, conn);
|
DispatchTransaction(ent, trans, conn);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -1676,12 +1676,12 @@ nsHttpConnectionMgr::TryDispatchTransaction(nsConnectionEntry *ent,
|
|||||||
// we check if the connection can be reused before even checking if
|
// we check if the connection can be reused before even checking if
|
||||||
// it is a "matching" connection.
|
// it is a "matching" connection.
|
||||||
if (!conn->CanReuse()) {
|
if (!conn->CanReuse()) {
|
||||||
LOG((" dropping stale connection: [conn=%x]\n", conn.get()));
|
LOG((" dropping stale connection: [conn=%p]\n", conn.get()));
|
||||||
conn->Close(NS_ERROR_ABORT);
|
conn->Close(NS_ERROR_ABORT);
|
||||||
conn = nullptr;
|
conn = nullptr;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG((" reusing connection [conn=%x]\n", conn.get()));
|
LOG((" reusing connection [conn=%p]\n", conn.get()));
|
||||||
conn->EndIdleMonitoring();
|
conn->EndIdleMonitoring();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1756,7 +1756,7 @@ nsHttpConnectionMgr::DispatchTransaction(nsConnectionEntry *ent,
|
|||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
LOG(("nsHttpConnectionMgr::DispatchTransaction "
|
LOG(("nsHttpConnectionMgr::DispatchTransaction "
|
||||||
"[ci=%s trans=%x caps=%x conn=%x priority=%d]\n",
|
"[ci=%s trans=%p caps=%x conn=%p priority=%d]\n",
|
||||||
ent->mConnInfo->HashKey().get(), trans, caps, conn, priority));
|
ent->mConnInfo->HashKey().get(), trans, caps, conn, priority));
|
||||||
|
|
||||||
// It is possible for a rate-paced transaction to be dispatched independent
|
// It is possible for a rate-paced transaction to be dispatched independent
|
||||||
@ -1816,7 +1816,7 @@ nsHttpConnectionMgr::DispatchAbstractTransaction(nsConnectionEntry *ent,
|
|||||||
MOZ_ASSERT(!conn->UsingSpdy(),
|
MOZ_ASSERT(!conn->UsingSpdy(),
|
||||||
"Spdy Must Not Use DispatchAbstractTransaction");
|
"Spdy Must Not Use DispatchAbstractTransaction");
|
||||||
LOG(("nsHttpConnectionMgr::DispatchAbstractTransaction "
|
LOG(("nsHttpConnectionMgr::DispatchAbstractTransaction "
|
||||||
"[ci=%s trans=%x caps=%x conn=%x]\n",
|
"[ci=%s trans=%p caps=%x conn=%p]\n",
|
||||||
ent->mConnInfo->HashKey().get(), aTrans, caps, conn));
|
ent->mConnInfo->HashKey().get(), aTrans, caps, conn));
|
||||||
|
|
||||||
/* Use pipeline datastructure even if connection does not currently qualify
|
/* Use pipeline datastructure even if connection does not currently qualify
|
||||||
|
Loading…
Reference in New Issue
Block a user