Bug 1222352 - Resource Timing - nextHopProtocol does not work in e10s r=nwgh

This commit is contained in:
Valentin Gosu 2015-11-24 13:42:47 +01:00
Родитель c89268e8b1
Коммит 3890536ca3
5 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -152,6 +152,7 @@ struct ParamTraits<mozilla::net::ResourceTimingStruct>
WriteParam(aMsg, aParam.transferSize);
WriteParam(aMsg, aParam.encodedBodySize);
WriteParam(aMsg, aParam.protocolVersion);
}
static bool Read(const Message* aMsg, void** aIter, mozilla::net::ResourceTimingStruct* aResult)
@ -167,7 +168,8 @@ struct ParamTraits<mozilla::net::ResourceTimingStruct>
ReadParam(aMsg, aIter, &aResult->redirectStart) &&
ReadParam(aMsg, aIter, &aResult->redirectEnd) &&
ReadParam(aMsg, aIter, &aResult->transferSize) &&
ReadParam(aMsg, aIter, &aResult->encodedBodySize);
ReadParam(aMsg, aIter, &aResult->encodedBodySize) &&
ReadParam(aMsg, aIter, &aResult->protocolVersion);
}
};

Просмотреть файл

@ -860,6 +860,7 @@ HttpChannelChild::OnStopRequest(const nsresult& channelStatus,
mRedirectEndTimeStamp = timing.redirectEnd;
mTransferSize = timing.transferSize;
mEncodedBodySize = timing.encodedBodySize;
mProtocolVersion = timing.protocolVersion;
nsPerformance* documentPerformance = GetPerformance();
if (documentPerformance) {
@ -1988,6 +1989,13 @@ HttpChannelChild::RedirectTo(nsIURI *newURI)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
HttpChannelChild::GetProtocolVersion(nsACString& aProtocolVersion)
{
aProtocolVersion = mProtocolVersion;
return NS_OK;
}
//-----------------------------------------------------------------------------
// HttpChannelChild::nsIHttpChannelInternal
//-----------------------------------------------------------------------------

Просмотреть файл

@ -83,6 +83,7 @@ public:
bool aMerge) override;
NS_IMETHOD SetEmptyRequestHeader(const nsACString& aHeader) override;
NS_IMETHOD RedirectTo(nsIURI *newURI) override;
NS_IMETHOD GetProtocolVersion(nsACString& aProtocolVersion) override;
// nsIHttpChannelInternal
NS_IMETHOD SetupFallbackChannel(const char *aFallbackKey) override;
NS_IMETHOD GetLocalAddress(nsACString& addr) override;
@ -194,6 +195,8 @@ private:
nsCString mCachedCharset;
nsCOMPtr<nsISupports> mCacheKey;
nsCString mProtocolVersion;
// If ResumeAt is called before AsyncOpen, we need to send extra data upstream
bool mSendResumeAt;

Просмотреть файл

@ -1178,6 +1178,7 @@ HttpChannelParent::OnStopRequest(nsIRequest *aRequest,
mChannel->GetEncodedBodySize(&timing.encodedBodySize);
// decodedBodySize can be computed in the child process so it doesn't need
// to be passed down.
mChannel->GetProtocolVersion(timing.protocolVersion);
if (mIPCClosed || !SendOnStopRequest(aStatusCode, timing))
return NS_ERROR_UNEXPECTED;

Просмотреть файл

@ -26,6 +26,7 @@ struct ResourceTimingStruct : TimingStruct {
TimeStamp redirectEnd;
uint64_t transferSize;
uint64_t encodedBodySize;
nsCString protocolVersion;
};
} // namespace net