зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1562315 - Respect again=false indicated by http2 session when calling through TLSFilterTransaction, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D36384 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d430ca54b8
Коммит
d056f02e32
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче