зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1853025
- send Caps parameter in PHttpTransaction::OnStartRequest message instead of PHttpTransaction::OnStopRequest message. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D188114
This commit is contained in:
Родитель
fccf853420
Коммит
d15b5eb695
|
@ -485,7 +485,7 @@ HttpTransactionChild::OnStartRequest(nsIRequest* aRequest) {
|
|||
ToTimingStructArgs(mTransaction->Timings()), proxyConnectResponseCode,
|
||||
dataForSniffer, optionalAltSvcUsed, !!mDataBridgeParent,
|
||||
mTransaction->TakeRestartedState(), mTransaction->HTTPSSVCReceivedStage(),
|
||||
mTransaction->GetSupportsHTTP3(), mode, reason);
|
||||
mTransaction->GetSupportsHTTP3(), mode, reason, mTransaction->Caps());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -565,7 +565,7 @@ HttpTransactionChild::OnStopRequest(nsIRequest* aRequest, nsresult aStatus) {
|
|||
mTransaction->GetTransferSize(),
|
||||
ToTimingStructArgs(mTransaction->Timings()),
|
||||
responseTrailers, mTransactionObserverResult,
|
||||
lastActTabOpt, mTransaction->Caps(), infoArgs);
|
||||
lastActTabOpt, infoArgs);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -413,7 +413,8 @@ mozilla::ipc::IPCResult HttpTransactionParent::RecvOnStartRequest(
|
|||
nsTArray<uint8_t>&& aDataForSniffer, const Maybe<nsCString>& aAltSvcUsed,
|
||||
const bool& aDataToChildProcess, const bool& aRestarted,
|
||||
const uint32_t& aHTTPSSVCReceivedStage, const bool& aSupportsHttp3,
|
||||
const nsIRequest::TRRMode& aMode, const TRRSkippedReason& aTrrSkipReason) {
|
||||
const nsIRequest::TRRMode& aMode, const TRRSkippedReason& aTrrSkipReason,
|
||||
const uint32_t& aCaps) {
|
||||
mEventQ->RunOrEnqueue(new NeckoTargetChannelFunctionEvent(
|
||||
this,
|
||||
[self = UnsafePtr<HttpTransactionParent>(this), aStatus, aResponseHead,
|
||||
|
@ -421,12 +422,12 @@ mozilla::ipc::IPCResult HttpTransactionParent::RecvOnStartRequest(
|
|||
aProxyConnectResponseCode,
|
||||
aDataForSniffer = CopyableTArray{std::move(aDataForSniffer)},
|
||||
aAltSvcUsed, aDataToChildProcess, aRestarted, aHTTPSSVCReceivedStage,
|
||||
aSupportsHttp3, aMode, aTrrSkipReason]() mutable {
|
||||
aSupportsHttp3, aMode, aTrrSkipReason, aCaps]() mutable {
|
||||
self->DoOnStartRequest(
|
||||
aStatus, aResponseHead, securityInfo, aProxyConnectFailed, aTimings,
|
||||
aProxyConnectResponseCode, std::move(aDataForSniffer), aAltSvcUsed,
|
||||
aDataToChildProcess, aRestarted, aHTTPSSVCReceivedStage,
|
||||
aSupportsHttp3, aMode, aTrrSkipReason);
|
||||
aSupportsHttp3, aMode, aTrrSkipReason, aCaps);
|
||||
}));
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -457,7 +458,8 @@ void HttpTransactionParent::DoOnStartRequest(
|
|||
nsTArray<uint8_t>&& aDataForSniffer, const Maybe<nsCString>& aAltSvcUsed,
|
||||
const bool& aDataToChildProcess, const bool& aRestarted,
|
||||
const uint32_t& aHTTPSSVCReceivedStage, const bool& aSupportsHttp3,
|
||||
const nsIRequest::TRRMode& aMode, const TRRSkippedReason& aSkipReason) {
|
||||
const nsIRequest::TRRMode& aMode, const TRRSkippedReason& aSkipReason,
|
||||
const uint32_t& aCaps) {
|
||||
LOG(("HttpTransactionParent::DoOnStartRequest [this=%p aStatus=%" PRIx32
|
||||
"]\n",
|
||||
this, static_cast<uint32_t>(aStatus)));
|
||||
|
@ -474,7 +476,7 @@ void HttpTransactionParent::DoOnStartRequest(
|
|||
mSupportsHTTP3 = aSupportsHttp3;
|
||||
mEffectiveTRRMode = aMode;
|
||||
mTRRSkipReason = aSkipReason;
|
||||
|
||||
mCaps = aCaps;
|
||||
mSecurityInfo = aSecurityInfo;
|
||||
|
||||
if (aResponseHead.isSome()) {
|
||||
|
@ -594,7 +596,7 @@ mozilla::ipc::IPCResult HttpTransactionParent::RecvOnStopRequest(
|
|||
const int64_t& aTransferSize, const TimingStructArgs& aTimings,
|
||||
const Maybe<nsHttpHeaderArray>& aResponseTrailers,
|
||||
Maybe<TransactionObserverResult>&& aTransactionObserverResult,
|
||||
const TimeStamp& aLastActiveTabOptHit, const uint32_t& aCaps,
|
||||
const TimeStamp& aLastActiveTabOptHit,
|
||||
const HttpConnectionInfoCloneArgs& aArgs) {
|
||||
LOG(("HttpTransactionParent::RecvOnStopRequest [this=%p status=%" PRIx32
|
||||
"]\n",
|
||||
|
@ -611,11 +613,10 @@ mozilla::ipc::IPCResult HttpTransactionParent::RecvOnStopRequest(
|
|||
this, [self = UnsafePtr<HttpTransactionParent>(this), aStatus,
|
||||
aResponseIsComplete, aTransferSize, aTimings, aResponseTrailers,
|
||||
aTransactionObserverResult{std::move(aTransactionObserverResult)},
|
||||
aCaps, cinfo{std::move(cinfo)}]() mutable {
|
||||
cinfo{std::move(cinfo)}]() mutable {
|
||||
self->DoOnStopRequest(aStatus, aResponseIsComplete, aTransferSize,
|
||||
aTimings, aResponseTrailers,
|
||||
std::move(aTransactionObserverResult), aCaps,
|
||||
cinfo);
|
||||
std::move(aTransactionObserverResult), cinfo);
|
||||
}));
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -625,7 +626,7 @@ void HttpTransactionParent::DoOnStopRequest(
|
|||
const int64_t& aTransferSize, const TimingStructArgs& aTimings,
|
||||
const Maybe<nsHttpHeaderArray>& aResponseTrailers,
|
||||
Maybe<TransactionObserverResult>&& aTransactionObserverResult,
|
||||
const uint32_t& aCaps, nsHttpConnectionInfo* aConnInfo) {
|
||||
nsHttpConnectionInfo* aConnInfo) {
|
||||
LOG(("HttpTransactionParent::DoOnStopRequest [this=%p]\n", this));
|
||||
if (mCanceled) {
|
||||
return;
|
||||
|
@ -645,7 +646,6 @@ void HttpTransactionParent::DoOnStopRequest(
|
|||
if (aResponseTrailers.isSome()) {
|
||||
mResponseTrailers = MakeUnique<nsHttpHeaderArray>(aResponseTrailers.ref());
|
||||
}
|
||||
mCaps = aCaps;
|
||||
mConnInfo = aConnInfo;
|
||||
if (aTransactionObserverResult.isSome()) {
|
||||
TransactionObserverFunc obs = nullptr;
|
||||
|
|
|
@ -55,7 +55,8 @@ class HttpTransactionParent final : public PHttpTransactionParent,
|
|||
nsTArray<uint8_t>&& aDataForSniffer, const Maybe<nsCString>& aAltSvcUsed,
|
||||
const bool& aDataToChildProcess, const bool& aRestarted,
|
||||
const uint32_t& aHTTPSSVCReceivedStage, const bool& aSupportsHttp3,
|
||||
const nsIRequest::TRRMode& aMode, const TRRSkippedReason& aSkipReason);
|
||||
const nsIRequest::TRRMode& aMode, const TRRSkippedReason& aSkipReason,
|
||||
const uint32_t& aCaps);
|
||||
mozilla::ipc::IPCResult RecvOnTransportStatus(
|
||||
const nsresult& aStatus, const int64_t& aProgress,
|
||||
const int64_t& aProgressMax,
|
||||
|
@ -68,7 +69,7 @@ class HttpTransactionParent final : public PHttpTransactionParent,
|
|||
const int64_t& aTransferSize, const TimingStructArgs& aTimings,
|
||||
const Maybe<nsHttpHeaderArray>& responseTrailers,
|
||||
Maybe<TransactionObserverResult>&& aTransactionObserverResult,
|
||||
const TimeStamp& aLastActiveTabOptHit, const uint32_t& aCaps,
|
||||
const TimeStamp& aLastActiveTabOptHit,
|
||||
const HttpConnectionInfoCloneArgs& aArgs);
|
||||
mozilla::ipc::IPCResult RecvOnInitFailed(const nsresult& aStatus);
|
||||
|
||||
|
@ -105,7 +106,8 @@ class HttpTransactionParent final : public PHttpTransactionParent,
|
|||
nsTArray<uint8_t>&& aDataForSniffer, const Maybe<nsCString>& aAltSvcUsed,
|
||||
const bool& aDataToChildProcess, const bool& aRestarted,
|
||||
const uint32_t& aHTTPSSVCReceivedStage, const bool& aSupportsHttp3,
|
||||
const nsIRequest::TRRMode& aMode, const TRRSkippedReason& aSkipReason);
|
||||
const nsIRequest::TRRMode& aMode, const TRRSkippedReason& aSkipReason,
|
||||
const uint32_t& aCaps);
|
||||
void DoOnDataAvailable(const nsCString& aData, const uint64_t& aOffset,
|
||||
const uint32_t& aCount);
|
||||
void DoOnStopRequest(
|
||||
|
@ -113,7 +115,7 @@ class HttpTransactionParent final : public PHttpTransactionParent,
|
|||
const int64_t& aTransferSize, const TimingStructArgs& aTimings,
|
||||
const Maybe<nsHttpHeaderArray>& responseTrailers,
|
||||
Maybe<TransactionObserverResult>&& aTransactionObserverResult,
|
||||
const uint32_t& aCaps, nsHttpConnectionInfo* aConnInfo);
|
||||
nsHttpConnectionInfo* aConnInfo);
|
||||
void DoNotifyListener();
|
||||
void ContinueDoNotifyListener();
|
||||
// Get event target for ODA.
|
||||
|
|
|
@ -58,7 +58,8 @@ parent:
|
|||
uint32_t HTTPSSVCReceivedStage,
|
||||
bool supportsHttp3,
|
||||
TRRMode trrMode,
|
||||
TRRSkippedReason trrSkipReason);
|
||||
TRRSkippedReason trrSkipReason,
|
||||
uint32_t caps);
|
||||
async OnTransportStatus(nsresult status,
|
||||
int64_t progress,
|
||||
int64_t progressMax,
|
||||
|
@ -73,7 +74,6 @@ parent:
|
|||
nsHttpHeaderArray? responseTrailers,
|
||||
TransactionObserverResult? transactionObserverResult,
|
||||
TimeStamp lastActiveTabOptimization,
|
||||
uint32_t caps,
|
||||
HttpConnectionInfoCloneArgs connInfoArgs);
|
||||
async OnInitFailed(nsresult status);
|
||||
async OnH2PushStream(uint32_t pushedStreamId,
|
||||
|
|
Загрузка…
Ссылка в новой задаче