diff --git a/netwerk/protocol/http/TunnelUtils.cpp b/netwerk/protocol/http/TunnelUtils.cpp index 15efa5f82644..68045343afe8 100644 --- a/netwerk/protocol/http/TunnelUtils.cpp +++ b/netwerk/protocol/http/TunnelUtils.cpp @@ -356,18 +356,20 @@ nsresult TLSFilterTransaction::ReadSegments(nsAHttpSegmentReader* aReader, return NS_SUCCEEDED(rv) ? mReadSegmentReturnValue : rv; } -nsresult TLSFilterTransaction::WriteSegments(nsAHttpSegmentWriter* aWriter, - uint32_t aCount, - uint32_t* outCountWritten) { +nsresult TLSFilterTransaction::WriteSegmentsAgain(nsAHttpSegmentWriter* aWriter, + uint32_t aCount, + uint32_t* outCountWritten, + bool* again) { MOZ_ASSERT(OnSocketThread(), "not on socket thread"); - LOG(("TLSFilterTransaction::WriteSegments %p max=%d\n", this, aCount)); + LOG(("TLSFilterTransaction::WriteSegmentsAgain %p max=%d\n", this, aCount)); if (!mTransaction) { return NS_ERROR_UNEXPECTED; } mSegmentWriter = aWriter; - nsresult rv = mTransaction->WriteSegments(this, aCount, outCountWritten); + nsresult rv = + mTransaction->WriteSegmentsAgain(this, aCount, outCountWritten, again); if (NS_SUCCEEDED(rv) && NS_FAILED(mFilterReadCode) && !(*outCountWritten)) { // nsPipe turns failures into silent OK.. undo that! rv = mFilterReadCode; @@ -381,6 +383,13 @@ nsresult TLSFilterTransaction::WriteSegments(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 a0fc7722e367..de86a5045392 100644 --- a/netwerk/protocol/http/TunnelUtils.h +++ b/netwerk/protocol/http/TunnelUtils.h @@ -144,6 +144,10 @@ 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();