Bug 1383748 - Fix SPDY while using proxy. r=mcmanus
authorWei-Cheng Pan <wpan@mozilla.com>
Thu, 27 Jul 2017 19:45:36 +0800
changeset 420322 de8759dd2b22a168169a51dd22575171f90db92a
parent 420264 09a412e3cc3b1a1fd9a1325e161d36b91018ef24
child 420323 a323aee88b0aebdd5c56c154615d7456ea21d527
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1383748
milestone56.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 1383748 - Fix SPDY while using proxy. r=mcmanus The SPDY status variable was overwrited by other function. Giving it a new meaningful name to prevent possible regression again. MozReview-Commit-ID: 4A98mKXXg7P
netwerk/protocol/http/nsHttpConnection.cpp
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -282,48 +282,49 @@ nsHttpConnection::StartSpdy(uint8_t spdy
     // a server goaway was generated).
     mIsReused = true;
 
     // If mTransaction is a muxed object it might represent
     // several requests. If so, we need to unpack that and
     // pack them all into a new spdy session.
 
     nsTArray<RefPtr<nsAHttpTransaction> > list;
-    nsresult rv = NS_OK;
+    nsresult status = NS_OK;
     if (!mDid0RTTSpdy) {
-        rv = TryTakeSubTransactions(list);
+        status = TryTakeSubTransactions(list);
 
-        if (NS_FAILED(rv) && rv != NS_ERROR_NOT_IMPLEMENTED) {
+        if (NS_FAILED(status) && status != NS_ERROR_NOT_IMPLEMENTED) {
             return;
         }
     }
 
     if (NeedSpdyTunnel()) {
         LOG3(("nsHttpConnection::StartSpdy %p Connecting To a HTTP/2 "
               "Proxy and Need Connect", this));
         MOZ_ASSERT(mProxyConnectStream);
 
         mProxyConnectStream = nullptr;
         mCompletedProxyConnect = true;
         mProxyConnectInProgress = false;
     }
 
+    nsresult rv = NS_OK;
     bool spdyProxy = mConnInfo->UsingHttpsProxy() && !mTLSFilter;
     if (spdyProxy) {
         RefPtr<nsHttpConnectionInfo> wildCardProxyCi;
         rv = mConnInfo->CreateWildCard(getter_AddRefs(wildCardProxyCi));
         MOZ_ASSERT(NS_SUCCEEDED(rv));
         gHttpHandler->ConnMgr()->MoveToWildCardConnEntry(mConnInfo,
                                                          wildCardProxyCi, this);
         mConnInfo = wildCardProxyCi;
         MOZ_DIAGNOSTIC_ASSERT(mConnInfo);
     }
 
     if (!mDid0RTTSpdy) {
-        rv = MoveTransactionsToSpdy(rv, list);
+        rv = MoveTransactionsToSpdy(status, list);
         if (NS_FAILED(rv)) {
             return;
         }
     }
 
     // Disable TCP Keepalives - use SPDY ping instead.
     rv = DisableTCPKeepalives();
     if (NS_FAILED(rv)) {