diff options
author | Moonchild <moonchild@palemoon.org> | 2020-08-13 17:13:23 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-08-30 09:38:29 +0000 |
commit | 9d6e28d3d0de8ddf5e482f7938822214f4da22ba (patch) | |
tree | 86dc723d3f9a9aa92d5a5538d8112c670d53214a /dom/script/ModuleLoadRequest.cpp | |
parent | c735355ae167b247fa80e03772b657fc34983f49 (diff) | |
download | UXP-9d6e28d3d0de8ddf5e482f7938822214f4da22ba.tar UXP-9d6e28d3d0de8ddf5e482f7938822214f4da22ba.tar.gz UXP-9d6e28d3d0de8ddf5e482f7938822214f4da22ba.tar.lz UXP-9d6e28d3d0de8ddf5e482f7938822214f4da22ba.tar.xz UXP-9d6e28d3d0de8ddf5e482f7938822214f4da22ba.zip |
Issue #618: Pass down referrer and referrer policy when fetching modules.
Because the spec says so.
Diffstat (limited to 'dom/script/ModuleLoadRequest.cpp')
-rw-r--r-- | dom/script/ModuleLoadRequest.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/dom/script/ModuleLoadRequest.cpp b/dom/script/ModuleLoadRequest.cpp index a75a922e2..5b0e0bdba 100644 --- a/dom/script/ModuleLoadRequest.cpp +++ b/dom/script/ModuleLoadRequest.cpp @@ -28,13 +28,17 @@ ModuleLoadRequest::ModuleLoadRequest(nsIURI* aURI, uint32_t aVersion, CORSMode aCORSMode, const SRIMetadata &aIntegrity, + nsIURI* aReferrer, + mozilla::net::ReferrerPolicy aReferrerPolicy, ScriptLoader* aLoader) : ScriptLoadRequest(ScriptKind::Module, aURI, aElement, aVersion, aCORSMode, - aIntegrity), + aIntegrity, + aReferrer, + aReferrerPolicy), mIsTopLevel(true), mLoader(aLoader), mVisitedSet(new VisitedURLSet()) @@ -49,7 +53,9 @@ ModuleLoadRequest::ModuleLoadRequest(nsIURI* aURI, aParent->mElement, aParent->mJSVersion, aParent->mCORSMode, - aParent->mIntegrity), + aParent->mIntegrity, + aParent->mURI, + aParent->mReferrerPolicy), mIsTopLevel(false), mLoader(aParent->mLoader), mVisitedSet(aParent->mVisitedSet) @@ -57,7 +63,6 @@ ModuleLoadRequest::ModuleLoadRequest(nsIURI* aURI, MOZ_ASSERT(mVisitedSet->Contains(aURI)); mIsInline = false; - mReferrerPolicy = aParent->mReferrerPolicy; } void ModuleLoadRequest::Cancel() |