зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1590763 - Record the async open time for DocumentChannel in the content process, since consumers expect this to be the same as the navigation start. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D50894 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
966031d6f8
Коммит
b9cfd1b167
|
@ -68,6 +68,7 @@ DocumentChannelChild::DocumentChannelChild(
|
|||
uint64_t channelId;
|
||||
Unused << handler->NewChannelId(channelId);
|
||||
mChannelId.emplace(channelId);
|
||||
mAsyncOpenTime = TimeStamp::Now();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -151,6 +152,7 @@ DocumentChannelChild::AsyncOpen(nsIStreamListener* aListener) {
|
|||
args.isTopLevelDoc() = mIsTopLevelDoc;
|
||||
args.hasNonEmptySandboxingFlags() = mHasNonEmptySandboxingFlags;
|
||||
args.channelId() = *mChannelId;
|
||||
args.asyncOpenTime() = mAsyncOpenTime;
|
||||
|
||||
nsCOMPtr<nsILoadContext> loadContext;
|
||||
NS_QueryNotificationCallbacks(this, loadContext);
|
||||
|
|
|
@ -115,6 +115,7 @@ class DocumentChannelChild final : public PDocumentChannelChild,
|
|||
|
||||
RedirectToRealChannelResolver mRedirectResolver;
|
||||
|
||||
TimeStamp mAsyncOpenTime;
|
||||
const RefPtr<nsDocShellLoadState> mLoadState;
|
||||
const Maybe<nsString> mInitiatorType;
|
||||
const uint32_t mLoadType;
|
||||
|
|
|
@ -122,6 +122,11 @@ bool DocumentChannelParent::Init(const DocumentChannelCreationArgs& aArgs) {
|
|||
httpChannelImpl->SetWarningReporter(this);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsITimedChannel> timedChannel = do_QueryInterface(mChannel);
|
||||
if (timedChannel) {
|
||||
timedChannel->SetAsyncOpen(aArgs.asyncOpenTime());
|
||||
}
|
||||
|
||||
// Setup a ClientChannelHelper to watch for redirects, and copy
|
||||
// across any serviceworker related data between channels as needed.
|
||||
AddClientChannelHelperInParent(mChannel, GetMainThreadSerialEventTarget());
|
||||
|
|
|
@ -357,6 +357,7 @@ struct DocumentChannelCreationArgs {
|
|||
DocShellLoadStateInit loadState;
|
||||
LoadInfoArgs loadInfo;
|
||||
PrincipalInfo? contentBlockingAllowListPrincipal;
|
||||
TimeStamp asyncOpenTime;
|
||||
nsString? initiatorType;
|
||||
nsString customUserAgent;
|
||||
uint64_t channelId;
|
||||
|
|
Загрузка…
Ссылка в новой задаче