Bugzilla
Quick Search
Browse
Advanced Search
Reports
Quick Search Help
Documentation
New Account
Log In
Login with GitHub
Remember
Forgot Password
Mozilla Home
Privacy
Cookies
Legal
Attachment 8949804 Details for
Bug 1416529
[patch]
patch for esr52
esr52.patch (text/plain), 4.66 KB, created by
u408661
(
hide
)
Description:
patch for esr52
Filename:
MIME Type:
Creator:
u408661
Size:
4.66 KB
patch
obsolete
># HG changeset patch ># User Nicholas Hurley <hurley@mozilla.com> ># Date Fri Feb 2 11:03:08 2018 -0800 >Bug 1416529 r=mcmanus >MozReview-Commit-ID: CD1l5vLB4yy > >diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp >index a2721017d3fb..a6e05f32b311 100644 >--- a/netwerk/protocol/http/Http2Session.cpp >+++ b/netwerk/protocol/http/Http2Session.cpp >@@ -1014,35 +1014,35 @@ Http2Session::CleanupStream(Http2Stream *aStream, nsresult aResult, > { > MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread); > LOG3(("Http2Session::CleanupStream %p %p 0x%X %X\n", > this, aStream, aStream ? aStream->StreamID() : 0, aResult)); > if (!aStream) { > return; > } > >+ Http2PushedStream *pushSource = aStream->PushSource(); >+ if (pushSource) { >+ // aStream is a synthetic attached to an even push >+ MOZ_ASSERT(pushSource->GetConsumerStream() == aStream); >+ MOZ_ASSERT(!aStream->StreamID()); >+ MOZ_ASSERT(!(pushSource->StreamID() & 0x1)); >+ aStream->ClearPushSource(); >+ } >+ > if (aStream->DeferCleanup(aResult)) { > LOG3(("Http2Session::CleanupStream 0x%X deferred\n", aStream->StreamID())); > return; > } > > if (!VerifyStream(aStream)) { > LOG3(("Http2Session::CleanupStream failed to verify stream\n")); > return; > } > >- Http2PushedStream *pushSource = aStream->PushSource(); >- if (pushSource) { >- // aStream is a synthetic attached to an even push >- MOZ_ASSERT(pushSource->GetConsumerStream() == aStream); >- MOZ_ASSERT(!aStream->StreamID()); >- MOZ_ASSERT(!(pushSource->StreamID() & 0x1)); >- pushSource->SetConsumerStream(nullptr); >- } >- > // don't reset a stream that has recevied a fin or rst > if (!aStream->RecvdFin() && !aStream->RecvdReset() && aStream->StreamID() && > !(mInputFrameFinal && (aStream == mInputFrameDataStream))) { // !(recvdfin with mark pending) > LOG3(("Stream 0x%X had not processed recv FIN, sending RST code %X\n", aStream->StreamID(), aResetCode)); > GenerateRstStream(aResetCode, aStream->StreamID()); > } > > CloseStream(aStream, aResult); >diff --git a/netwerk/protocol/http/Http2Stream.cpp b/netwerk/protocol/http/Http2Stream.cpp >index 5c562557cda5..37c9eeffb4bb 100644 >--- a/netwerk/protocol/http/Http2Stream.cpp >+++ b/netwerk/protocol/http/Http2Stream.cpp >@@ -97,20 +97,30 @@ Http2Stream::Http2Stream(nsAHttpTransaction *httpTransaction, > httpPriority = kNormalPriority + priority; > } > MOZ_ASSERT(httpPriority >= 0); > SetPriority(static_cast<uint32_t>(httpPriority)); > } > > Http2Stream::~Http2Stream() > { >+ ClearPushSource(); > ClearTransactionsBlockedOnTunnel(); > mStreamID = Http2Session::kDeadStreamID; > } > >+void >+Http2Stream::ClearPushSource() >+{ >+ if (mPushSource) { >+ mPushSource->SetConsumerStream(nullptr); >+ mPushSource = nullptr; >+ } >+} >+ > // ReadSegments() is used to write data down the socket. Generally, HTTP > // request data is pulled from the approriate transaction and > // converted to HTTP/2 data. Sometimes control data like a window-update is > // generated instead. > > nsresult > Http2Stream::ReadSegments(nsAHttpSegmentReader *reader, > uint32_t count, >@@ -1075,16 +1085,20 @@ Http2Stream::ConvertPushHeaders(Http2Decompressor *decompressor, > mHeaderScheme.get(), mHeaderHost.get(), mHeaderPath.get(), > aHeadersOut.BeginReading())); > return NS_OK; > } > > void > Http2Stream::Close(nsresult reason) > { >+ // In case we are connected to a push, make sure the push knows we are closed, >+ // so it doesn't try to give us any more DATA that comes on it after our close. >+ ClearPushSource(); >+ > mTransaction->Close(reason); > } > > void > Http2Stream::SetResponseIsComplete() > { > nsHttpTransaction *trans = mTransaction->QueryHttpTransaction(); > if (trans) { >diff --git a/netwerk/protocol/http/Http2Stream.h b/netwerk/protocol/http/Http2Stream.h >index 452db5fe0d67..6c98f08f6fc9 100644 >--- a/netwerk/protocol/http/Http2Stream.h >+++ b/netwerk/protocol/http/Http2Stream.h >@@ -45,16 +45,17 @@ public: > const static int32_t kNormalPriority = 0x1000; > const static int32_t kWorstPriority = kNormalPriority + nsISupportsPriority::PRIORITY_LOWEST; > const static int32_t kBestPriority = kNormalPriority + nsISupportsPriority::PRIORITY_HIGHEST; > > Http2Stream(nsAHttpTransaction *, Http2Session *, int32_t); > > uint32_t StreamID() { return mStreamID; } > Http2PushedStream *PushSource() { return mPushSource; } >+ void ClearPushSource(); > > stateType HTTPState() { return mState; } > void SetHTTPState(stateType val) { mState = val; } > > virtual nsresult ReadSegments(nsAHttpSegmentReader *, uint32_t, uint32_t *); > virtual nsresult WriteSegments(nsAHttpSegmentWriter *, uint32_t, uint32_t *); > virtual bool DeferCleanup(nsresult status); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
ritu
: approval-mozilla-esr52+
Actions:
View
|
Diff
|
Review
Attachments on
bug 1416529
:
8927611
|
8945193
|
8948023
|
8949245
|
8949803
| 8949804