Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug

This commit is contained in:
Andrea Marchesini 2018-01-24 17:17:31 +01:00
parent 40555b75ce
commit 6480b95ba3
60 changed files with 224 additions and 12 deletions

View File

@ -10680,6 +10680,7 @@ nsDocShell::DoURILoad(nsIURI* aURI,
rv = NS_NewChannelInternal(getter_AddRefs(channel),
aURI,
loadInfo,
nullptr, // PerformanceStorage
nullptr, // loadGroup
static_cast<nsIInterfaceRequestor*>(this),
loadFlags);

View File

@ -109,6 +109,7 @@ SendPing(void* aClosure, nsIContent* aContent, nsIURI* aURI,
? nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED
: nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_PING,
nullptr, // PerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL, // aLoadFlags,

View File

@ -1036,6 +1036,7 @@ EventSourceImpl::InitChannelAndRequestEventSource()
doc,
securityFlags,
nsIContentPolicy::TYPE_INTERNAL_EVENTSOURCE,
nullptr, // aPerformanceStorage
loadGroup,
nullptr, // aCallbacks
loadFlags); // aLoadFlags
@ -1046,6 +1047,7 @@ EventSourceImpl::InitChannelAndRequestEventSource()
mPrincipal,
securityFlags,
nsIContentPolicy::TYPE_INTERNAL_EVENTSOURCE,
nullptr, // aPerformanceStorage
nullptr, // loadGroup
nullptr, // aCallbacks
loadFlags); // aLoadFlags

View File

@ -1156,6 +1156,7 @@ Navigator::SendBeaconInternal(const nsAString& aUrl,
doc,
securityFlags,
nsIContentPolicy::TYPE_BEACON,
nullptr, // aPerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
loadFlags);

View File

@ -1191,6 +1191,7 @@ nsExternalResourceMap::PendingLoad::StartLoad(nsIURI* aURI,
aRequestingNode,
nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS,
nsIContentPolicy::TYPE_OTHER,
nullptr, // aPerformanceStorage
loadGroup);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -2509,6 +2509,7 @@ nsObjectLoadingContent::OpenChannel()
thisContent,
securityFlags,
contentPolicyType,
nullptr, // aPerformanceStorage
group, // aLoadGroup
shim, // aCallbacks
nsIChannel::LOAD_CALL_CONTENT_SNIFFERS |

View File

@ -321,6 +321,7 @@ nsSyncLoadService::LoadDocument(nsIURI *aURI,
aLoaderPrincipal,
aSecurityFlags,
aContentPolicyType,
nullptr, // PerformanceStorage
aLoadGroup);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -426,7 +426,9 @@ public:
// We don't track if a worker is spawned from a tracking script for now,
// so pass false as the last argument to FetchDriver().
fetch = new FetchDriver(mRequest, principal, loadGroup,
workerPrivate->MainThreadEventTarget(), false);
workerPrivate->MainThreadEventTarget(),
workerPrivate->GetPerformanceStorage(),
false);
nsAutoCString spec;
if (proxy->GetWorkerPrivate()->GetBaseURI()) {
proxy->GetWorkerPrivate()->GetBaseURI()->GetAsciiSpec(spec);
@ -530,7 +532,9 @@ FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput,
new MainThreadFetchResolver(p, observer, signal, request->MozErrors());
RefPtr<FetchDriver> fetch =
new FetchDriver(r, principal, loadGroup,
aGlobal->EventTargetFor(TaskCategory::Other), isTrackingFetch);
aGlobal->EventTargetFor(TaskCategory::Other),
nullptr, // PerformanceStorage
isTrackingFetch);
fetch->SetDocument(doc);
resolver->SetLoadGroup(loadGroup);
aRv = fetch->Fetch(signal, resolver);

View File

@ -31,6 +31,7 @@
#include "nsHttpChannel.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/PerformanceStorage.h"
#include "mozilla/dom/workers/Workers.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/ipc/PBackgroundSharedTypes.h"
@ -325,13 +326,17 @@ NS_IMPL_ISUPPORTS(FetchDriver,
nsIStreamListener, nsIChannelEventSink, nsIInterfaceRequestor,
nsIThreadRetargetableStreamListener)
FetchDriver::FetchDriver(InternalRequest* aRequest, nsIPrincipal* aPrincipal,
nsILoadGroup* aLoadGroup, nsIEventTarget* aMainThreadEventTarget,
FetchDriver::FetchDriver(InternalRequest* aRequest,
nsIPrincipal* aPrincipal,
nsILoadGroup* aLoadGroup,
nsIEventTarget* aMainThreadEventTarget,
PerformanceStorage* aPerformanceStorage,
bool aIsTrackingFetch)
: mPrincipal(aPrincipal)
, mLoadGroup(aLoadGroup)
, mRequest(aRequest)
, mMainThreadEventTarget(aMainThreadEventTarget)
, mPerformanceStorage(aPerformanceStorage)
, mNeedToObserveOnDataAvailable(false)
, mIsTrackingFetch(aIsTrackingFetch)
#ifdef DEBUG
@ -516,6 +521,7 @@ FetchDriver::HttpFetch(const nsACString& aPreferredAlternativeDataType)
mDocument,
secFlags,
mRequest->ContentPolicyType(),
nullptr, /* aPerformanceStorage */
mLoadGroup,
nullptr, /* aCallbacks */
loadFlags,
@ -528,6 +534,7 @@ FetchDriver::HttpFetch(const nsACString& aPreferredAlternativeDataType)
mController,
secFlags,
mRequest->ContentPolicyType(),
mPerformanceStorage,
mLoadGroup,
nullptr, /* aCallbacks */
loadFlags,
@ -538,6 +545,7 @@ FetchDriver::HttpFetch(const nsACString& aPreferredAlternativeDataType)
mPrincipal,
secFlags,
mRequest->ContentPolicyType(),
mPerformanceStorage,
mLoadGroup,
nullptr, /* aCallbacks */
loadFlags,

View File

@ -32,6 +32,7 @@ namespace dom {
class InternalRequest;
class InternalResponse;
class PerformanceStorage;
/**
* Provides callbacks to be called when response is available or on error.
@ -109,6 +110,7 @@ public:
nsIPrincipal* aPrincipal,
nsILoadGroup* aLoadGroup,
nsIEventTarget* aMainThreadEventTarget,
PerformanceStorage* aPerformanceStorage,
bool aIsTrackingFetch);
nsresult Fetch(AbortSignal* aSignal,
@ -147,6 +149,10 @@ private:
nsCOMPtr<nsIChannel> mChannel;
nsAutoPtr<SRICheckDataVerifier> mSRIDataVerifier;
nsCOMPtr<nsIEventTarget> mMainThreadEventTarget;
// This is set only when Fetch is used in workers.
RefPtr<PerformanceStorage> mPerformanceStorage;
SRIMetadata mSRIMetadata;
nsCString mWorkerScript;

View File

@ -1218,6 +1218,7 @@ public:
triggeringPrincipal,
securityFlags,
contentPolicyType,
nullptr, // aPerformanceStorage
loadGroup,
nullptr, // aCallbacks
nsICachingChannel::LOAD_BYPASS_LOCAL_CACHE_IF_BUSY |

View File

@ -327,6 +327,7 @@ HTMLTrackElement::LoadResource()
static_cast<Element*>(this),
secFlags,
nsIContentPolicy::TYPE_INTERNAL_TRACK,
nullptr, // PerformanceStorage
loadGroup,
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL | nsIChannel::LOAD_CLASSIFY_URI);

View File

@ -1630,6 +1630,7 @@ nsHTMLDocument::Open(JSContext* cx,
callerDoc,
nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // PerformanceStorage
group);
if (aError.Failed()) {

View File

@ -726,6 +726,7 @@ ChannelMediaResource::RecreateChannel()
triggeringPrincipal,
securityFlags,
contentPolicyType,
nullptr, // aPerformanceStorage
loadGroup,
nullptr, // aCallbacks
loadFlags);

View File

@ -0,0 +1,34 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_PerformanceStorage_h
#define mozilla_dom_PerformanceStorage_h
#include "nsISupportsImpl.h"
class nsIHttpChannel;
class nsITimedChannel;
namespace mozilla {
namespace dom {
class PerformanceStorage
{
public:
NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING
virtual void AddEntry(nsIHttpChannel* aChannel,
nsITimedChannel* aTimedChannel) = 0;
protected:
virtual ~PerformanceStorage() {}
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_PerformanceStorage_h

View File

@ -18,6 +18,7 @@ EXPORTS.mozilla.dom += [
'PerformanceObserverEntryList.h',
'PerformanceResourceTiming.h',
'PerformanceService.h',
'PerformanceStorage.h',
'PerformanceTiming.h',
]

View File

@ -3173,6 +3173,7 @@ nsresult nsPluginHost::NewPluginURLStream(const nsString& aURL,
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS |
nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL,
nsIContentPolicy::TYPE_OBJECT_SUBREQUEST,
nullptr, // aPerformanceStorage
nullptr, // aLoadGroup
listenerPeer,
nsIRequest::LOAD_NORMAL | nsIChannel::LOAD_CLASSIFY_URI |

View File

@ -1065,6 +1065,7 @@ ScriptLoader::StartLoad(ScriptLoadRequest* aRequest)
aRequest->mTriggeringPrincipal,
securityFlags,
contentPolicyType,
nullptr, // aPerformanceStorage
loadGroup,
prompter,
nsIRequest::LOAD_NORMAL |

View File

@ -1073,6 +1073,7 @@ nsCSPContext::SendReports(
doc,
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_CSP_REPORT,
nullptr, // aPerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
loadFlags);
@ -1083,6 +1084,7 @@ nsCSPContext::SendReports(
mLoadingPrincipal,
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_CSP_REPORT,
nullptr, // PerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
loadFlags);

View File

@ -1364,6 +1364,7 @@ nsresult nsWebBrowserPersist::SaveURIInternal(
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // aPerformanceStorage
nullptr, // aLoadGroup
static_cast<nsIInterfaceRequestor*>(this),
loadFlags);

View File

@ -57,6 +57,7 @@
#include "mozilla/dom/InternalResponse.h"
#include "mozilla/dom/nsCSPService.h"
#include "mozilla/dom/nsCSPUtils.h"
#include "mozilla/dom/PerformanceStorage.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/PromiseNativeHandler.h"
#include "mozilla/dom/Response.h"
@ -110,6 +111,7 @@ nsresult
ChannelFromScriptURL(nsIPrincipal* principal,
nsIURI* baseURI,
nsIDocument* parentDoc,
WorkerPrivate* aWorkerPrivate,
nsILoadGroup* loadGroup,
nsIIOService* ios,
nsIScriptSecurityManager* secMan,
@ -190,6 +192,7 @@ ChannelFromScriptURL(nsIPrincipal* principal,
parentDoc,
secFlags,
contentPolicyType,
nullptr, // aPerformanceStorage
loadGroup,
nullptr, // aCallbacks
aLoadFlags,
@ -200,6 +203,11 @@ ChannelFromScriptURL(nsIPrincipal* principal,
MOZ_ASSERT(loadGroup);
MOZ_ASSERT(NS_LoadGroupMatchesPrincipal(loadGroup, principal));
RefPtr<PerformanceStorage> performanceStorage;
if (aWorkerPrivate && !aIsMainScript) {
performanceStorage = aWorkerPrivate->GetPerformanceStorage();
}
if (aClientInfo.isSome()) {
rv = NS_NewChannel(getter_AddRefs(channel),
uri,
@ -208,6 +216,7 @@ ChannelFromScriptURL(nsIPrincipal* principal,
aController,
secFlags,
contentPolicyType,
performanceStorage,
loadGroup,
nullptr, // aCallbacks
aLoadFlags,
@ -218,6 +227,7 @@ ChannelFromScriptURL(nsIPrincipal* principal,
principal,
secFlags,
contentPolicyType,
performanceStorage,
loadGroup,
nullptr, // aCallbacks
aLoadFlags,
@ -991,7 +1001,8 @@ private:
// Only top level workers' main script use the document charset for the
// script uri encoding. Otherwise, default encoding (UTF-8) is applied.
bool useDefaultEncoding = !(!parentWorker && IsMainWorkerScript());
rv = ChannelFromScriptURL(principal, baseURI, parentDoc, loadGroup, ios,
rv = ChannelFromScriptURL(principal, baseURI, parentDoc, mWorkerPrivate,
loadGroup, ios,
secMan, loadInfo.mURL,
mClientInfo, mController,
IsMainWorkerScript(),
@ -2266,8 +2277,8 @@ ChannelFromScriptURLMainThread(nsIPrincipal* aPrincipal,
nsIScriptSecurityManager* secMan = nsContentUtils::GetSecurityManager();
NS_ASSERTION(secMan, "This should never be null!");
return ChannelFromScriptURL(aPrincipal, aBaseURI, aParentDoc, aLoadGroup,
ios, secMan, aScriptURL, aClientInfo,
return ChannelFromScriptURL(aPrincipal, aBaseURI, aParentDoc, nullptr,
aLoadGroup, ios, secMan, aScriptURL, aClientInfo,
Maybe<ServiceWorkerDescriptor>(),
true, WorkerScript, aMainScriptContentPolicyType,
nsIRequest::LOAD_NORMAL, aDefaultURIEncoding,

View File

@ -730,7 +730,10 @@ CompareNetwork::Initialize(nsIPrincipal* aPrincipal,
// use the TYPE_INTERNAL_SCRIPT content policy types when loading a service
// worker.
rv = NS_NewChannel(getter_AddRefs(mChannel), uri, aPrincipal, secFlags,
contentPolicyType, loadGroup, nullptr /* aCallbacks */,
contentPolicyType,
nullptr, /* aPerformanceStorage */
loadGroup,
nullptr /* aCallbacks */,
mLoadFlags);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;

View File

@ -7199,6 +7199,14 @@ WorkerPrivate::DumpCrashInformation(nsACString& aString)
}
}
PerformanceStorage*
WorkerPrivate::GetPerformanceStorage()
{
AssertIsOnMainThread();
// TODO
return nullptr;
}
NS_IMPL_ISUPPORTS_INHERITED0(ExternalRunnableWrapper, WorkerRunnable)
template <class Derived>

View File

@ -68,6 +68,7 @@ class ClientSource;
class Function;
class MessagePort;
class MessagePortIdentifier;
class PerformanceStorage;
class PromiseNativeHandler;
class StructuredCloneHolder;
class WorkerDebuggerGlobalScope;
@ -1512,6 +1513,9 @@ public:
void
ExecutionReady();
PerformanceStorage*
GetPerformanceStorage();
private:
WorkerPrivate(WorkerPrivate* aParent,
const nsAString& aScriptURL, bool aIsChromeWorker,

View File

@ -1112,6 +1112,7 @@ nsXBLService::FetchBindingDocument(nsIContent* aBoundElement, nsIDocument* aBoun
nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS |
nsILoadInfo::SEC_ALLOW_CHROME,
nsIContentPolicy::TYPE_XBL,
nullptr, // aPerformanceStorage
loadGroup);
}
else {
@ -1120,6 +1121,7 @@ nsXBLService::FetchBindingDocument(nsIContent* aBoundElement, nsIDocument* aBoun
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS,
nsIContentPolicy::TYPE_XBL,
nullptr, // PerformanceStorage
loadGroup);
}
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -2508,6 +2508,7 @@ XMLHttpRequestMainThread::CreateChannel()
responsibleDocument,
secFlags,
nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,
nullptr, // aPerformanceStorage
loadGroup,
nullptr, // aCallbacks
loadFlags);
@ -2519,6 +2520,7 @@ XMLHttpRequestMainThread::CreateChannel()
mController,
secFlags,
nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,
mPerformanceStorage, // aPerformanceStorage
loadGroup,
nullptr, // aCallbacks
loadFlags);
@ -2529,6 +2531,7 @@ XMLHttpRequestMainThread::CreateChannel()
mPrincipal,
secFlags,
nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,
mPerformanceStorage, // aPerformanceStorage
loadGroup,
nullptr, // aCallbacks
loadFlags);

View File

@ -41,6 +41,7 @@
#include "mozilla/dom/TypedArray.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/FormData.h"
#include "mozilla/dom/PerformanceStorage.h"
#include "mozilla/dom/ServiceWorkerDescriptor.h"
#include "mozilla/dom/URLSearchParams.h"
#include "mozilla/dom/XMLHttpRequest.h"
@ -201,7 +202,8 @@ public:
void Construct(nsIPrincipal* aPrincipal,
nsIGlobalObject* aGlobalObject,
nsIURI* aBaseURI = nullptr,
nsILoadGroup* aLoadGroup = nullptr)
nsILoadGroup* aLoadGroup = nullptr,
PerformanceStorage* aPerformanceStorage = nullptr)
{
MOZ_ASSERT(aPrincipal);
nsCOMPtr<nsPIDOMWindowInner> win = do_QueryInterface(aGlobalObject);
@ -214,6 +216,7 @@ public:
BindToOwner(aGlobalObject);
mBaseURI = aBaseURI;
mLoadGroup = aLoadGroup;
mPerformanceStorage = aPerformanceStorage;
}
void InitParameters(bool aAnon, bool aSystem);
@ -588,6 +591,8 @@ protected:
nsCOMPtr<nsIStreamListener> mXMLParserStreamListener;
RefPtr<PerformanceStorage> mPerformanceStorage;
// used to implement getAllResponseHeaders()
class nsHeaderVisitor : public nsIHttpHeaderVisitor
{

View File

@ -873,7 +873,8 @@ Proxy::Init()
mXHR = new XMLHttpRequestMainThread();
mXHR->Construct(mWorkerPrivate->GetPrincipal(), global,
mWorkerPrivate->GetBaseURI(),
mWorkerPrivate->GetLoadGroup());
mWorkerPrivate->GetLoadGroup(),
mWorkerPrivate->GetPerformanceStorage());
mXHR->SetParameters(mMozAnon, mMozSystem);
mXHR->SetClientInfoAndController(mClientInfo, mController);

View File

@ -433,6 +433,7 @@ XMLDocument::Load(const nsAString& aUrl, CallerType aCallerType,
static_cast<nsIDocument*>(this),
nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED,
nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,
nullptr, // aPerformanceStorage
loadGroup,
req,
nsIRequest::LOAD_BACKGROUND);

View File

@ -58,6 +58,7 @@ URIUtils::ResetWithSource(nsIDocument *aNewDoc, nsINode *aSourceNode)
sourceDoc,
nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // aPerformanceStorage
loadGroup,
nullptr, // aCallbacks
nsIChannel::LOAD_BYPASS_SERVICE_WORKER);

View File

@ -455,6 +455,7 @@ txCompileObserver::startLoad(nsIURI* aUri, txStylesheetCompiler* aCompiler,
aReferrerPrincipal, // triggeringPrincipal
nsILoadInfo::SEC_REQUIRE_CORS_DATA_INHERITS,
nsIContentPolicy::TYPE_XSLT,
nullptr, // aPerformanceStorage
loadGroup);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -2446,6 +2446,7 @@ XULDocument::LoadOverlayInternal(nsIURI* aURI, bool aIsDynamic,
nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS |
nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // PerformanceStorage
group);
if (NS_SUCCEEDED(rv)) {

View File

@ -297,6 +297,7 @@ nsresult nsAutoConfig::downloadAutoConfig()
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // PerformanceStorage
nullptr, // loadGroup
nullptr, // aCallbacks
nsIRequest::INHIBIT_PERSISTENT_CACHING |

View File

@ -806,6 +806,7 @@ NewImageChannel(nsIChannel** aResult,
aTriggeringPrincipal,
securityFlags,
aPolicyType,
nullptr, // PerformanceStorage
nullptr, // loadGroup
callbacks,
aLoadFlags);
@ -837,6 +838,7 @@ NewImageChannel(nsIChannel** aResult,
nsContentUtils::GetSystemPrincipal(),
securityFlags,
aPolicyType,
nullptr, // PerformanceStorage
nullptr, // loadGroup
callbacks,
aLoadFlags);

View File

@ -256,6 +256,7 @@ class MOZ_STACK_CLASS ComponentLoaderInfo {
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_SCRIPT,
nullptr, // aPerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL,

View File

@ -467,6 +467,7 @@ mozJSSubScriptLoader::ReadScriptAsync(nsIURI* uri,
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // aPerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL,
@ -517,6 +518,7 @@ mozJSSubScriptLoader::ReadScript(nsIURI* uri,
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // PerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL,

View File

@ -657,6 +657,7 @@ FontFaceSet::StartLoad(gfxUserFontEntry* aUserFontEntry,
principal ? principal->get() : nullptr,
nsILoadInfo::SEC_REQUIRE_CORS_DATA_INHERITS,
nsIContentPolicy::TYPE_FONT,
nullptr, // PerformanceStorage
loadGroup);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -1510,6 +1510,7 @@ Loader::LoadSheet(SheetLoadData* aLoadData,
aLoadData->mLoaderPrincipal,
securityFlags,
contentPolicyType,
nullptr, // Performancestorage
loadGroup,
nullptr, // aCallbacks
nsIChannel::LOAD_NORMAL |
@ -1525,6 +1526,7 @@ Loader::LoadSheet(SheetLoadData* aLoadData,
nsContentUtils::GetSystemPrincipal(),
securityFlags,
contentPolicyType,
nullptr, // aPerformanceStorage
loadGroup,
nullptr, // aCallbacks
nsIChannel::LOAD_NORMAL |

View File

@ -816,6 +816,7 @@ nsJARChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *ctx)
rv = NS_NewChannelInternal(getter_AddRefs(channel),
mJarBaseURI,
mLoadInfo,
nullptr, // PerformanceStorage
mLoadGroup,
mCallbacks,
loadFlags);

View File

@ -9,6 +9,7 @@
#include "mozilla/Assertions.h"
#include "mozilla/dom/ClientIPCTypes.h"
#include "mozilla/dom/ClientSource.h"
#include "mozilla/dom/PerformanceStorage.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/dom/ToJSValue.h"
#include "mozIThirdPartyUtil.h"
@ -333,6 +334,7 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
// mReservedClientInfo must be handled specially during redirect
// mInitialClientInfo must be handled specially during redirect
, mController(rhs.mController)
, mPerformanceStorage(rhs.mPerformanceStorage)
, mLoadingContext(rhs.mLoadingContext)
, mContextForTopLevelLoad(rhs.mContextForTopLevelLoad)
, mSecurityFlags(rhs.mSecurityFlags)
@ -1246,5 +1248,17 @@ LoadInfo::GetController()
return mController;
}
void
LoadInfo::SetPerformanceStorage(PerformanceStorage* aPerformanceStorage)
{
mPerformanceStorage = aPerformanceStorage;
}
PerformanceStorage*
LoadInfo::GetPerformanceStorage()
{
return mPerformanceStorage;
}
} // namespace net
} // namespace mozilla

View File

@ -24,6 +24,7 @@ class nsPIDOMWindowOuter;
namespace mozilla {
namespace dom {
class PerformanceStorage;
class XMLHttpRequestMainThread;
}
@ -166,6 +167,7 @@ private:
Maybe<mozilla::dom::ClientInfo> mReservedClientInfo;
Maybe<mozilla::dom::ClientInfo> mInitialClientInfo;
Maybe<mozilla::dom::ServiceWorkerDescriptor> mController;
RefPtr<mozilla::dom::PerformanceStorage> mPerformanceStorage;
nsWeakPtr mLoadingContext;
nsWeakPtr mContextForTopLevelLoad;

View File

@ -1449,6 +1449,7 @@ Predictor::Prefetch(nsIURI *uri, nsIURI *referrer,
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, /* aPerformanceStorage */
nullptr, /* aLoadGroup */
nullptr, /* aCallbacks */
nsIRequest::LOAD_BACKGROUND);

View File

@ -24,6 +24,7 @@ namespace mozilla {
namespace dom {
class ClientInfo;
class ClientSource;
class PerformanceStorage;
class ServiceWorkerDescriptor;
} // namespace dom
} // namespace mozilla
@ -41,6 +42,7 @@ native OriginAttributes(mozilla::OriginAttributes);
[ref] native const_MaybeClientInfoRef(const mozilla::Maybe<mozilla::dom::ClientInfo>);
[ref] native const_ServiceWorkerDescriptorRef(const mozilla::dom::ServiceWorkerDescriptor);
[ref] native const_MaybeServiceWorkerDescriptorRef(const mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor>);
[ptr] native PerformanceStoragePtr(mozilla::dom::PerformanceStorage);
typedef unsigned long nsSecurityFlags;
@ -924,4 +926,18 @@ interface nsILoadInfo : nsISupports
*/
[noscript, nostdcall, notxpcom]
const_MaybeServiceWorkerDescriptorRef GetController();
/**
* Set a custom performance storage. This is meant to be executed only for
* workers. If a PerformanceStorage is not set, the loadingDocument->Window
* Performance object will be used instead.
*/
[noscript, nostdcall, notxpcom]
void SetPerformanceStorage(in PerformanceStoragePtr aPerformanceStorage);
/**
* Get the PerformanceStorage.
*/
[noscript, nostdcall, notxpcom]
PerformanceStoragePtr GetPerformanceStorage();
};

View File

@ -250,6 +250,7 @@ nsIncrementalDownload::ProcessTimeout()
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // PerformanceStorage
nullptr, // loadGroup
this, // aCallbacks
mLoadFlags);

View File

@ -83,6 +83,7 @@
using namespace mozilla;
using namespace mozilla::net;
using mozilla::dom::ClientInfo;
using mozilla::dom::PerformanceStorage;
using mozilla::dom::ServiceWorkerDescriptor;
#define DEFAULT_RP 3
@ -164,6 +165,7 @@ nsresult
NS_NewChannelInternal(nsIChannel **outChannel,
nsIURI *aUri,
nsILoadInfo *aLoadInfo,
PerformanceStorage *aPerformanceStorage /* = nullptr */,
nsILoadGroup *aLoadGroup /* = nullptr */,
nsIInterfaceRequestor *aCallbacks /* = nullptr */,
nsLoadFlags aLoadFlags /* = nsIRequest::LOAD_NORMAL */,
@ -209,6 +211,14 @@ NS_NewChannelInternal(nsIChannel **outChannel,
NS_ENSURE_SUCCESS(rv, rv);
}
if (aPerformanceStorage) {
nsCOMPtr<nsILoadInfo> loadInfo;
rv = channel->GetLoadInfo(getter_AddRefs(loadInfo));
NS_ENSURE_SUCCESS(rv, rv);
loadInfo->SetPerformanceStorage(aPerformanceStorage);
}
channel.forget(outChannel);
return NS_OK;
}
@ -269,6 +279,7 @@ NS_NewChannel(nsIChannel **outChannel,
nsIPrincipal *aLoadingPrincipal,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
PerformanceStorage *aPerformanceStorage /* nullptr */,
nsILoadGroup *aLoadGroup /* = nullptr */,
nsIInterfaceRequestor *aCallbacks /* = nullptr */,
nsLoadFlags aLoadFlags /* = nsIRequest::LOAD_NORMAL */,
@ -283,6 +294,7 @@ NS_NewChannel(nsIChannel **outChannel,
Maybe<ServiceWorkerDescriptor>(),
aSecurityFlags,
aContentPolicyType,
aPerformanceStorage,
aLoadGroup,
aCallbacks,
aLoadFlags,
@ -297,6 +309,7 @@ NS_NewChannel(nsIChannel **outChannel,
const Maybe<ServiceWorkerDescriptor>& aController,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
PerformanceStorage *aPerformanceStorage /* nullptr */,
nsILoadGroup *aLoadGroup /* = nullptr */,
nsIInterfaceRequestor *aCallbacks /* = nullptr */,
nsLoadFlags aLoadFlags /* = nsIRequest::LOAD_NORMAL */,
@ -318,6 +331,7 @@ NS_NewChannel(nsIChannel **outChannel,
aController,
aSecurityFlags,
aContentPolicyType,
aPerformanceStorage,
aLoadGroup,
aCallbacks,
aLoadFlags,
@ -334,6 +348,7 @@ NS_NewChannelInternal(nsIChannel **outChannel,
const Maybe<ServiceWorkerDescriptor>& aController,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
PerformanceStorage *aPerformanceStorage /* nullptr */,
nsILoadGroup *aLoadGroup /* = nullptr */,
nsIInterfaceRequestor *aCallbacks /* = nullptr */,
nsLoadFlags aLoadFlags /* = nsIRequest::LOAD_NORMAL */,
@ -385,6 +400,14 @@ NS_NewChannelInternal(nsIChannel **outChannel,
NS_ENSURE_SUCCESS(rv, rv);
}
if (aPerformanceStorage) {
nsCOMPtr<nsILoadInfo> loadInfo;
rv = channel->GetLoadInfo(getter_AddRefs(loadInfo));
NS_ENSURE_SUCCESS(rv, rv);
loadInfo->SetPerformanceStorage(aPerformanceStorage);
}
channel.forget(outChannel);
return NS_OK;
}
@ -396,6 +419,7 @@ NS_NewChannelWithTriggeringPrincipal(nsIChannel **outChannel,
nsIPrincipal *aTriggeringPrincipal,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
PerformanceStorage *aPerformanceStorage /* = nullptr */,
nsILoadGroup *aLoadGroup /* = nullptr */,
nsIInterfaceRequestor *aCallbacks /* = nullptr */,
nsLoadFlags aLoadFlags /* = nsIRequest::LOAD_NORMAL */,
@ -412,6 +436,7 @@ NS_NewChannelWithTriggeringPrincipal(nsIChannel **outChannel,
Maybe<ServiceWorkerDescriptor>(),
aSecurityFlags,
aContentPolicyType,
aPerformanceStorage,
aLoadGroup,
aCallbacks,
aLoadFlags,
@ -426,6 +451,7 @@ NS_NewChannelWithTriggeringPrincipal(nsIChannel **outChannel,
nsIPrincipal *aTriggeringPrincipal,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
PerformanceStorage *aPerformanceStorage /* = nullptr */,
nsILoadGroup *aLoadGroup /* = nullptr */,
nsIInterfaceRequestor *aCallbacks /* = nullptr */,
nsLoadFlags aLoadFlags /* = nsIRequest::LOAD_NORMAL */,
@ -441,6 +467,7 @@ NS_NewChannelWithTriggeringPrincipal(nsIChannel **outChannel,
Maybe<ServiceWorkerDescriptor>(),
aSecurityFlags,
aContentPolicyType,
aPerformanceStorage,
aLoadGroup,
aCallbacks,
aLoadFlags,
@ -457,6 +484,7 @@ NS_NewChannelWithTriggeringPrincipal(nsIChannel **outChannel,
const Maybe<ServiceWorkerDescriptor>& aController,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
PerformanceStorage *aPerformanceStorage /* = nullptr */,
nsILoadGroup *aLoadGroup /* = nullptr */,
nsIInterfaceRequestor *aCallbacks /* = nullptr */,
nsLoadFlags aLoadFlags /* = nsIRequest::LOAD_NORMAL */,
@ -478,6 +506,7 @@ NS_NewChannelWithTriggeringPrincipal(nsIChannel **outChannel,
aController,
aSecurityFlags,
aContentPolicyType,
aPerformanceStorage,
aLoadGroup,
aCallbacks,
aLoadFlags,
@ -490,6 +519,7 @@ NS_NewChannel(nsIChannel **outChannel,
nsINode *aLoadingNode,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
PerformanceStorage *aPerformanceStorage /* = nullptr */,
nsILoadGroup *aLoadGroup /* = nullptr */,
nsIInterfaceRequestor *aCallbacks /* = nullptr */,
nsLoadFlags aLoadFlags /* = nsIRequest::LOAD_NORMAL */,
@ -505,6 +535,7 @@ NS_NewChannel(nsIChannel **outChannel,
Maybe<ServiceWorkerDescriptor>(),
aSecurityFlags,
aContentPolicyType,
aPerformanceStorage,
aLoadGroup,
aCallbacks,
aLoadFlags,
@ -1036,6 +1067,7 @@ NS_NewStreamLoaderInternal(nsIStreamLoader **outStream,
Maybe<ServiceWorkerDescriptor>(),
aSecurityFlags,
aContentPolicyType,
nullptr, // PerformanceStorage
aLoadGroup,
aCallbacks,
aLoadFlags);

View File

@ -58,6 +58,7 @@ class Encoding;
class OriginAttributes;
namespace dom {
class ClientInfo;
class PerformanceStorage;
class ServiceWorkerDescriptor;
} // namespace dom
} // namespace mozilla
@ -159,6 +160,7 @@ nsresult NS_NewChannelInternal(nsIChannel **outChannel,
const mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor>& aController,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
mozilla::dom::PerformanceStorage* aPerformanceStorage = nullptr,
nsILoadGroup *aLoadGroup = nullptr,
nsIInterfaceRequestor *aCallbacks = nullptr,
nsLoadFlags aLoadFlags = nsIRequest::LOAD_NORMAL,
@ -168,6 +170,7 @@ nsresult NS_NewChannelInternal(nsIChannel **outChannel,
nsresult NS_NewChannelInternal(nsIChannel **outChannel,
nsIURI *aUri,
nsILoadInfo *aLoadInfo,
mozilla::dom::PerformanceStorage* aPerformanceStorage = nullptr,
nsILoadGroup *aLoadGroup = nullptr,
nsIInterfaceRequestor *aCallbacks = nullptr,
nsLoadFlags aLoadFlags = nsIRequest::LOAD_NORMAL,
@ -181,6 +184,7 @@ NS_NewChannelWithTriggeringPrincipal(nsIChannel **outChannel,
nsIPrincipal *aTriggeringPrincipal,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
mozilla::dom::PerformanceStorage* aPerformanceStorage = nullptr,
nsILoadGroup *aLoadGroup = nullptr,
nsIInterfaceRequestor *aCallbacks = nullptr,
nsLoadFlags aLoadFlags = nsIRequest::LOAD_NORMAL,
@ -194,6 +198,7 @@ NS_NewChannelWithTriggeringPrincipal(nsIChannel **outChannel,
nsIPrincipal *aTriggeringPrincipal,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
mozilla::dom::PerformanceStorage* aPerformanceStorage = nullptr,
nsILoadGroup *aLoadGroup = nullptr,
nsIInterfaceRequestor *aCallbacks = nullptr,
nsLoadFlags aLoadFlags = nsIRequest::LOAD_NORMAL,
@ -209,6 +214,7 @@ NS_NewChannelWithTriggeringPrincipal(nsIChannel **outChannel,
const mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor>& aController,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
mozilla::dom::PerformanceStorage* aPerformanceStorage = nullptr,
nsILoadGroup *aLoadGroup = nullptr,
nsIInterfaceRequestor *aCallbacks = nullptr,
nsLoadFlags aLoadFlags = nsIRequest::LOAD_NORMAL,
@ -222,6 +228,7 @@ NS_NewChannel(nsIChannel **outChannel,
nsINode *aLoadingNode,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
mozilla::dom::PerformanceStorage* aPerformanceStorage = nullptr,
nsILoadGroup *aLoadGroup = nullptr,
nsIInterfaceRequestor *aCallbacks = nullptr,
nsLoadFlags aLoadFlags = nsIRequest::LOAD_NORMAL,
@ -234,6 +241,7 @@ NS_NewChannel(nsIChannel **outChannel,
nsIPrincipal *aLoadingPrincipal,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
mozilla::dom::PerformanceStorage* aPerformanceStorage = nullptr,
nsILoadGroup *aLoadGroup = nullptr,
nsIInterfaceRequestor *aCallbacks = nullptr,
nsLoadFlags aLoadFlags = nsIRequest::LOAD_NORMAL,
@ -248,6 +256,7 @@ NS_NewChannel(nsIChannel** outChannel,
const mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor>& aController,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
mozilla::dom::PerformanceStorage* aPerformanceStorage = nullptr,
nsILoadGroup* aLoadGroup = nullptr,
nsIInterfaceRequestor* aCallbacks = nullptr,
nsLoadFlags aLoadFlags = nsIRequest::LOAD_NORMAL,

View File

@ -499,6 +499,7 @@ nsPACMan::StartLoading()
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // PerformanceStorage,
nullptr, // aLoadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL,

View File

@ -152,7 +152,7 @@ FTPChannelParent::DoAsyncOpen(const URIParams& aURI,
nsCOMPtr<nsIChannel> chan;
rv = NS_NewChannelInternal(getter_AddRefs(chan), uri, loadInfo,
nullptr, nullptr,
nullptr, nullptr, nullptr,
nsIRequest::LOAD_NORMAL, ios);
if (NS_FAILED(rv))

View File

@ -1709,6 +1709,7 @@ HttpChannelChild::SetupRedirect(nsIURI* uri,
rv = NS_NewChannelInternal(getter_AddRefs(newChannel),
uri,
redirectLoadInfo,
nullptr, // PerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL,

View File

@ -526,7 +526,7 @@ HttpChannelParent::DoAsyncOpen( const URIParams& aURI,
nsCOMPtr<nsIChannel> channel;
rv = NS_NewChannelInternal(getter_AddRefs(channel), uri, loadInfo,
nullptr, nullptr, aLoadFlags, ios);
nullptr, nullptr, nullptr, aLoadFlags, ios);
if (NS_FAILED(rv)) {
return SendFailedAsyncOpen(rv);
}

View File

@ -212,6 +212,7 @@ InterceptedHttpChannel::FollowSyntheticRedirect()
rv = NS_NewChannelInternal(getter_AddRefs(newChannel),
redirectURI,
redirectLoadInfo,
nullptr, // PerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
mLoadFlags,
@ -665,6 +666,7 @@ InterceptedHttpChannel::ResetInterception(void)
nsresult rv = NS_NewChannelInternal(getter_AddRefs(newChannel),
mURI,
redirectLoadInfo,
nullptr, // PerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
mLoadFlags);

View File

@ -1494,6 +1494,7 @@ nsCORSListenerProxy::StartCORSPreflight(nsIChannel* aRequestChannel,
rv = NS_NewChannelInternal(getter_AddRefs(preflightChannel),
uri,
loadInfo,
nullptr, // PerformanceStorage
loadGroup,
nullptr, // aCallbacks
loadFlags);

View File

@ -2839,6 +2839,7 @@ nsHttpChannel::StartRedirectChannelToURI(nsIURI *upgradedURI, uint32_t flags)
rv = NS_NewChannelInternal(getter_AddRefs(newChannel),
upgradedURI,
redirectLoadInfo,
nullptr, // PerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL,
@ -5592,6 +5593,7 @@ nsHttpChannel::ContinueProcessRedirectionAfterFallback(nsresult rv)
rv = NS_NewChannelInternal(getter_AddRefs(newChannel),
mRedirectURI,
redirectLoadInfo,
nullptr, // PerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL,
@ -8507,6 +8509,7 @@ nsHttpChannel::OnPush(const nsACString &url, Http2PushedStream *pushedStream)
rv = NS_NewChannelInternal(getter_AddRefs(pushChannel),
pushResource,
mLoadInfo,
nullptr, // PerformanceStorage
nullptr, // aLoadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL,

View File

@ -117,6 +117,7 @@ WyciwygChannelParent::RecvInit(const URIParams& aURI,
triggeringPrincipal,
aSecurityFlags,
aContentPolicyType,
nullptr, // PerformanceStorage
nullptr, // loadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_NORMAL,

View File

@ -941,6 +941,7 @@ RDFXMLDataSourceImpl::Refresh(bool aBlocking)
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // aPerformanceStorage
nullptr, // aLoadGroup
this); // aCallbacks
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -2127,6 +2127,7 @@ nsUrlClassifierDBService::SendThreatHitReport(nsIChannel *aChannel,
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // aPerformanceStorage
nullptr, // aLoadGroup
nullptr,
loadFlags);

View File

@ -140,6 +140,7 @@ nsUrlClassifierStreamUpdater::FetchUpdate(nsIURI *aUpdateUrl,
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // aPerformanceStorage
nullptr, // aLoadGroup
this, // aInterfaceRequestor
loadFlags);

View File

@ -181,6 +181,7 @@ nsManifestCheck::Begin()
mLoadingPrincipal,
nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED,
nsIContentPolicy::TYPE_OTHER,
nullptr, // PerformanceStorage
nullptr, // loadGroup
nullptr, // aCallbacks
nsIRequest::LOAD_BYPASS_CACHE);
@ -378,6 +379,7 @@ nsOfflineCacheUpdateItem::OpenChannel(nsOfflineCacheUpdate *aUpdate)
mLoadingPrincipal,
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // PerformanceStorage
nullptr, // aLoadGroup
this, // aCallbacks
flags);

View File

@ -152,6 +152,7 @@ nsPrefetchNode::OpenChannel()
Maybe<ServiceWorkerDescriptor>(),
securityFlags,
mPolicyType,
nullptr, // aPerformanceStorage
loadGroup, // aLoadGroup
this, // aCallbacks
nsIRequest::LOAD_BACKGROUND |

View File

@ -1282,6 +1282,7 @@ nsDirectoryViewerFactory::CreateInstance(const char *aCommand,
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // PerformanceStorage
aLoadGroup);
if (NS_FAILED(rv)) return rv;