Bug 1563803 - Backout bug 1562315 for causing regressions, r=dragana
authorHonza Bambas <honzab.moz@firemni.cz>
Fri, 05 Jul 2019 19:13:33 +0000
changeset 544327 8b43d46ba3f4e94755068cebce63ac04452e89d3
parent 544326 10e5f2b2940c984040c8b440c3641bfd7f9f6853
child 544328 477989aa5e6439946b2addd0c6b3e1f328979db2
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdragana
bugs1563803, 1562315
milestone69.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 1563803 - Backout bug 1562315 for causing regressions, r=dragana Differential Revision: https://phabricator.services.mozilla.com/D37103
netwerk/protocol/http/TunnelUtils.cpp
netwerk/protocol/http/TunnelUtils.h
--- a/netwerk/protocol/http/TunnelUtils.cpp
+++ b/netwerk/protocol/http/TunnelUtils.cpp
@@ -351,50 +351,41 @@ nsresult TLSFilterTransaction::ReadSegme
     LOG(("TLSFilterTransaction %p read segment blocked found rv=%" PRIx32 "\n",
          this, static_cast<uint32_t>(rv)));
     Unused << Connection()->ForceSend();
   }
 
   return NS_SUCCEEDED(rv) ? mReadSegmentReturnValue : rv;
 }
 
-nsresult TLSFilterTransaction::WriteSegmentsAgain(nsAHttpSegmentWriter* aWriter,
-                                                  uint32_t aCount,
-                                                  uint32_t* outCountWritten,
-                                                  bool* again) {
+nsresult TLSFilterTransaction::WriteSegments(nsAHttpSegmentWriter* aWriter,
+                                             uint32_t aCount,
+                                             uint32_t* outCountWritten) {
   MOZ_ASSERT(OnSocketThread(), "not on socket thread");
-  LOG(("TLSFilterTransaction::WriteSegmentsAgain %p max=%d\n", this, aCount));
+  LOG(("TLSFilterTransaction::WriteSegments %p max=%d\n", this, aCount));
 
   if (!mTransaction) {
     return NS_ERROR_UNEXPECTED;
   }
 
   mSegmentWriter = aWriter;
-  nsresult rv =
-      mTransaction->WriteSegmentsAgain(this, aCount, outCountWritten, again);
+  nsresult rv = mTransaction->WriteSegments(this, aCount, outCountWritten);
   if (NS_SUCCEEDED(rv) && NS_FAILED(mFilterReadCode) && !(*outCountWritten)) {
     // nsPipe turns failures into silent OK.. undo that!
     rv = mFilterReadCode;
     if (Connection() && (mFilterReadCode == NS_BASE_STREAM_WOULD_BLOCK)) {
       Unused << Connection()->ResumeRecv();
     }
   }
   LOG(("TLSFilterTransaction %p called trans->WriteSegments rv=%" PRIx32
        " %d\n",
        this, static_cast<uint32_t>(rv), *outCountWritten));
   return rv;
 }
 
-nsresult TLSFilterTransaction::WriteSegments(nsAHttpSegmentWriter* aWriter,
-                                             uint32_t aCount,
-                                             uint32_t* outCountWritten) {
-  bool again = false;
-  return WriteSegmentsAgain(aWriter, aCount, outCountWritten, &again);
-}
-
 nsresult TLSFilterTransaction::GetTransactionSecurityInfo(
     nsISupports** outSecInfo) {
   if (!mSecInfo) {
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsISupports> temp(mSecInfo);
   temp.forget(outSecInfo);
--- a/netwerk/protocol/http/TunnelUtils.h
+++ b/netwerk/protocol/http/TunnelUtils.h
@@ -139,20 +139,16 @@ class TLSFilterTransaction final : publi
                    nsIAsyncInputStream** outSocketIn,
                    nsIAsyncOutputStream** outSocketOut);
 
   // nsAHttpTransaction overloads
   bool IsNullTransaction() override;
   NullHttpTransaction* QueryNullTransaction() override;
   nsHttpTransaction* QueryHttpTransaction() override;
   SpdyConnectTransaction* QuerySpdyConnectTransaction() override;
-  MOZ_MUST_USE nsresult WriteSegmentsAgain(nsAHttpSegmentWriter* writer,
-                                           uint32_t count,
-                                           uint32_t* countWritten,
-                                           bool* again) override;
 
  private:
   MOZ_MUST_USE nsresult StartTimerCallback();
   void Cleanup();
   int32_t FilterOutput(const char* aBuf, int32_t aAmount);
   int32_t FilterInput(char* aBuf, int32_t aAmount);
 
   static PRStatus GetPeerName(PRFileDesc* fd, PRNetAddr* addr);