Backed out changeset ee570e804c7f (bug 1188435)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 25 Apr 2017 16:31:58 +0200
changeset 354824 568c8aec3caaefb4c7e55b7f922d0c9f551e43a7
parent 354823 8dee197fe7c150617acef4fc1d8bb04856319766
child 354825 f59a72936f726643b20454bc08e0879a2a9978bc
push id31714
push userkwierso@gmail.com
push dateTue, 25 Apr 2017 20:53:09 +0000
treeherdermozilla-central@2c497462f25e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1188435
milestone55.0a1
backs outee570e804c7f1cf02c63f74e1f97759b7c8b6035
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
Backed out changeset ee570e804c7f (bug 1188435)
netwerk/protocol/http/nsHttpConnection.cpp
netwerk/protocol/http/nsHttpConnectionMgr.cpp
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -2300,40 +2300,30 @@ nsHttpConnection::CheckForTraffic(bool c
         mTrafficStamp = false;
     }
 }
 
 nsAHttpTransaction *
 nsHttpConnection::CloseConnectionFastOpenTakesTooLongOrError()
 {
     MOZ_ASSERT(!mCurrentBytesRead);
-
-    RefPtr<nsAHttpTransaction> trans;
     if (mUsingSpdyVersion) {
-        // If we have a http2 connection just restart it as if 0rtt failed.
-        // For http2 we do not nee to do similar thing as for http1 because
-        // backup connection will pick immediately all this transaction anyway.
         DontReuse();
         mUsingSpdyVersion = 0;
-        if (mSpdySession) {
-            mSpdySession->Finish0RTT(true, true);
-        }
         mSpdySession = nullptr;
-    } else {
-        // For http1 we want to make this transaction an absolute priority to
-        // get the backup connection so we will return it from here.
-        if (NS_SUCCEEDED(mTransaction->RestartOnFastOpenError())) {
-            trans = mTransaction;
-        }
     }
 
     {
         MutexAutoLock lock(mCallbacksLock);
         mCallbacks = nullptr;
     }
 
+    RefPtr<nsAHttpTransaction> trans = nullptr;
+    if (NS_SUCCEEDED(mTransaction->RestartOnFastOpenError())) {
+        trans = mTransaction;
+    }
     mTransaction = nullptr;
     Close(NS_ERROR_NET_RESET);
     return trans;
 }
 
 } // namespace net
 } // namespace mozilla
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -3507,17 +3507,19 @@ nsHalfOpenSocket::FastOpenConnected(nsre
                (aError == NS_ERROR_NET_TIMEOUT)) {
         if (mEnt->mUseFastOpen) {
             gHttpHandler->IncrementFastOpenConsecutiveFailureCounter();
             mEnt->mUseFastOpen = false;
         }
         // This is called from nsSocketTransport::RecoverFromError. The
         // socket will try connect and we need to rewind nsHttpTransaction
         MOZ_ASSERT(mConnectionNegotiatingFastOpen);
-        Unused << mConnectionNegotiatingFastOpen->Transaction()->RestartOnFastOpenError();
+        DebugOnly<nsresult> rv =
+            mConnectionNegotiatingFastOpen->Transaction()->RestartOnFastOpenError();
+        MOZ_ASSERT(NS_SUCCEEDED(rv));
     }
     if (mConnectionNegotiatingFastOpen) {
         mSocketTransport = nullptr;
         mConnectionNegotiatingFastOpen = nullptr;
     }
 }
 
 void