зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1844535 - Add protocol version to HttpChannelOnStartRequestArgs. r=necko-reviewers,kershaw
The patch sends the protocol version to the child process during OnStartRequest request instead of OnStopRequest. More details on why this change is required can be found in [this](https://bugzilla.mozilla.org/show_bug.cgi?id=1397646#c27) comment Differential Revision: https://phabricator.services.mozilla.com/D184262
This commit is contained in:
Родитель
10a46f9dac
Коммит
87dfc197fe
|
@ -526,7 +526,6 @@ struct ResourceTimingStructArgs {
|
|||
TimeStamp redirectEnd;
|
||||
uint64_t transferSize;
|
||||
uint64_t encodedBodySize;
|
||||
nsCString protocolVersion;
|
||||
|
||||
// Not actually part of resource timing, but not part of the transaction
|
||||
// timings either. These need to be passed to HttpChannelChild along with
|
||||
|
|
|
@ -429,6 +429,7 @@ void HttpChannelChild::OnStartRequest(
|
|||
mCacheEntryAvailable = aArgs.cacheEntryAvailable();
|
||||
mCacheEntryId = aArgs.cacheEntryId();
|
||||
mCacheFetchCount = aArgs.cacheFetchCount();
|
||||
mProtocolVersion = aArgs.protocolVersion();
|
||||
mCacheExpirationTime = aArgs.cacheExpirationTime();
|
||||
mSelfAddr = aArgs.selfAddr();
|
||||
mPeerAddr = aArgs.peerAddr();
|
||||
|
@ -900,7 +901,6 @@ void HttpChannelChild::OnStopRequest(
|
|||
mRedirectEndTimeStamp = aTiming.redirectEnd();
|
||||
mTransferSize = aTiming.transferSize();
|
||||
mEncodedBodySize = aTiming.encodedBodySize();
|
||||
mProtocolVersion = aTiming.protocolVersion();
|
||||
|
||||
mCacheReadStart = aTiming.cacheReadStart();
|
||||
mCacheReadEnd = aTiming.cacheReadEnd();
|
||||
|
|
|
@ -59,6 +59,7 @@ struct HttpChannelOnStartRequestArgs
|
|||
bool hasHTTPSRR;
|
||||
bool isProxyUsed;
|
||||
uint8_t redirectCount;
|
||||
nsCString protocolVersion;
|
||||
};
|
||||
|
||||
struct HttpChannelAltDataStream
|
||||
|
|
|
@ -1046,10 +1046,6 @@ static ResourceTimingStructArgs GetTimingAttributes(HttpBaseChannel* aChannel) {
|
|||
// decodedBodySize can be computed in the child process so it doesn't need
|
||||
// to be passed down.
|
||||
|
||||
nsCString protocolVersion;
|
||||
aChannel->GetProtocolVersion(protocolVersion);
|
||||
args.protocolVersion() = protocolVersion;
|
||||
|
||||
aChannel->GetCacheReadStart(&timeStamp);
|
||||
args.cacheReadStart() = timeStamp;
|
||||
|
||||
|
@ -1137,6 +1133,7 @@ HttpChannelParent::OnStartRequest(nsIRequest* aRequest) {
|
|||
httpChannelImpl->GetCacheEntryId(&args.cacheEntryId());
|
||||
httpChannelImpl->GetCacheTokenFetchCount(&args.cacheFetchCount());
|
||||
httpChannelImpl->GetCacheTokenExpirationTime(&args.cacheExpirationTime());
|
||||
httpChannelImpl->GetProtocolVersion(args.protocolVersion());
|
||||
|
||||
mDataSentToChildProcess = httpChannelImpl->DataSentToChildProcess();
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ nsresult HttpTransactionChild::InitInternal(
|
|||
};
|
||||
}
|
||||
|
||||
std::function<void(TransactionObserverResult &&)> observer;
|
||||
std::function<void(TransactionObserverResult&&)> observer;
|
||||
if (aHasTransactionObserver) {
|
||||
nsMainThreadPtrHandle<HttpTransactionChild> handle(
|
||||
new nsMainThreadPtrHolder<HttpTransactionChild>(
|
||||
|
@ -509,7 +509,6 @@ ResourceTimingStructArgs HttpTransactionChild::GetTimingAttributes() {
|
|||
args.encodedBodySize() = mLogicalOffset;
|
||||
args.redirectStart() = mRedirectStart;
|
||||
args.redirectEnd() = mRedirectEnd;
|
||||
args.protocolVersion() = mProtocolVersion;
|
||||
return args;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче