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/ScriptLoader.h | |
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/ScriptLoader.h')
-rw-r--r-- | dom/script/ScriptLoader.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/dom/script/ScriptLoader.h b/dom/script/ScriptLoader.h index 4155f08f8..2a14b53ae 100644 --- a/dom/script/ScriptLoader.h +++ b/dom/script/ScriptLoader.h @@ -66,7 +66,9 @@ public: nsIScriptElement* aElement, uint32_t aVersion, mozilla::CORSMode aCORSMode, - const mozilla::dom::SRIMetadata &aIntegrity) + const mozilla::dom::SRIMetadata& aIntegrity, + nsIURI* aReferrer, + mozilla::net::ReferrerPolicy aReferrerPolicy) : mKind(aKind), mElement(aElement), mProgress(Progress::Loading), @@ -86,7 +88,8 @@ public: mLineNo(1), mCORSMode(aCORSMode), mIntegrity(aIntegrity), - mReferrerPolicy(mozilla::net::RP_Default) + mReferrer(aReferrer), + mReferrerPolicy(aReferrerPolicy) { } @@ -173,7 +176,8 @@ public: int32_t mLineNo; const mozilla::CORSMode mCORSMode; const mozilla::dom::SRIMetadata mIntegrity; - mozilla::net::ReferrerPolicy mReferrerPolicy; + const nsCOMPtr<nsIURI> mReferrer; + const mozilla::net::ReferrerPolicy mReferrerPolicy; }; class ScriptLoadRequestList : private mozilla::LinkedList<ScriptLoadRequest> @@ -470,13 +474,13 @@ public: private: virtual ~ScriptLoader(); - ScriptLoadRequest* CreateLoadRequest( - ScriptKind aKind, - nsIURI* aURI, - nsIScriptElement* aElement, - uint32_t aVersion, - mozilla::CORSMode aCORSMode, - const mozilla::dom::SRIMetadata &aIntegrity); + ScriptLoadRequest* CreateLoadRequest(ScriptKind aKind, + nsIURI* aURI, + nsIScriptElement* aElement, + uint32_t aVersion, + mozilla::CORSMode aCORSMode, + const mozilla::dom::SRIMetadata& aIntegrity, + mozilla::net::ReferrerPolicy aReferrerPolicy); /** * Unblocks the creator parser of the parser-blocking scripts. |