From 436942424d027fb394fe2e5dc69fbb84ef312078 Mon Sep 17 00:00:00 2001 From: Honza Bambas Date: Fri, 5 Jul 2019 19:13:33 +0000 Subject: [PATCH] Bug 1563803 - Backout bug 1562315 for causing regressions, r=dragana Differential Revision: https://phabricator.services.mozilla.com/D37103 --HG-- extra : moz-landing-system : lando --- netwerk/protocol/http/TunnelUtils.cpp | 19 +++++-------------- netwerk/protocol/http/TunnelUtils.h | 4 ---- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/netwerk/protocol/http/TunnelUtils.cpp b/netwerk/protocol/http/TunnelUtils.cpp index 68045343afe8..15efa5f82644 100644 --- a/netwerk/protocol/http/TunnelUtils.cpp +++ b/netwerk/protocol/http/TunnelUtils.cpp @@ -356,20 +356,18 @@ nsresult TLSFilterTransaction::ReadSegments(nsAHttpSegmentReader* aReader, 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; @@ -383,13 +381,6 @@ nsresult TLSFilterTransaction::WriteSegmentsAgain(nsAHttpSegmentWriter* aWriter, 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) { diff --git a/netwerk/protocol/http/TunnelUtils.h b/netwerk/protocol/http/TunnelUtils.h index de86a5045392..a0fc7722e367 100644 --- a/netwerk/protocol/http/TunnelUtils.h +++ b/netwerk/protocol/http/TunnelUtils.h @@ -144,10 +144,6 @@ class TLSFilterTransaction final : public nsAHttpTransaction, 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();