Backed out 6 changesets (bug 1313937, bug 1843066, bug 1843002) for causing build bustages in ScriptLoadRequest.h. CLOSED TREE
Backed out changeset 84c2d1c04aa2 (bug 1313937) Backed out changeset 7cab9a1ea25f (bug 1313937) Backed out changeset affc7d1f130d (bug 1313937) Backed out changeset e13aacfe7944 (bug 1843066) Backed out changeset 21a9bee8f772 (bug 1843002) Backed out changeset d381b6365111 (bug 1843002)
This commit is contained in:
@@ -55,18 +55,22 @@ class LoadContextBase;
|
||||
class ModuleLoadRequest;
|
||||
class ScriptLoadRequestList;
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-request-parser-metadata
|
||||
// All scripts are either "parser-inserted" or "not-parser-inserted", so
|
||||
// the empty string is not necessary.
|
||||
enum class ParserMetadata {
|
||||
NotParserInserted,
|
||||
ParserInserted,
|
||||
};
|
||||
|
||||
/*
|
||||
* ScriptFetchOptions loosely corresponds to HTML's "script fetch options",
|
||||
* https://html.spec.whatwg.org/multipage/webappapis.html#script-fetch-options
|
||||
* with the exception of the following properties:
|
||||
* cryptographic nonce
|
||||
* The cryptographic nonce metadata used for the initial fetch and for
|
||||
* fetching any imported modules. As this is populated by a DOM element,
|
||||
* this is implemented via mozilla::dom::Element as the field
|
||||
* mElement. The default value is an empty string, and is indicated
|
||||
* when this field is a nullptr. Nonce is not represented on the dom
|
||||
* side as per bug 1374612.
|
||||
* parser metadata
|
||||
* The parser metadata used for the initial fetch and for fetching any
|
||||
* imported modules. This is populated from a mozilla::dom::Element and is
|
||||
* handled by the field mElement. The default value is an empty string,
|
||||
* and is indicated when this field is a nullptr.
|
||||
* integrity metadata
|
||||
* The integrity metadata used for the initial fetch. This is
|
||||
* implemented in ScriptLoadRequest, as it changes for every
|
||||
@@ -87,8 +91,6 @@ class ScriptFetchOptions {
|
||||
|
||||
ScriptFetchOptions(mozilla::CORSMode aCORSMode,
|
||||
enum mozilla::dom::ReferrerPolicy aReferrerPolicy,
|
||||
const nsAString& aNonce,
|
||||
const ParserMetadata aParserMetadata,
|
||||
nsIPrincipal* aTriggeringPrincipal,
|
||||
mozilla::dom::Element* aElement = nullptr);
|
||||
|
||||
@@ -105,18 +107,6 @@ class ScriptFetchOptions {
|
||||
*/
|
||||
const enum mozilla::dom::ReferrerPolicy mReferrerPolicy;
|
||||
|
||||
/*
|
||||
* The cryptographic nonce metadata used for the initial fetch and for
|
||||
* fetching any imported modules.
|
||||
*/
|
||||
const nsString mNonce;
|
||||
|
||||
/*
|
||||
* The parser metadata used for the initial fetch and for fetching any
|
||||
* imported modules
|
||||
*/
|
||||
const ParserMetadata mParserMetadata;
|
||||
|
||||
/*
|
||||
* Used to determine CSP and if we are on the About page.
|
||||
* Only used in DOM content scripts.
|
||||
@@ -297,12 +287,6 @@ class ScriptLoadRequest
|
||||
return mFetchOptions->mReferrerPolicy;
|
||||
}
|
||||
|
||||
ParserMetadata ParserMetadata() const {
|
||||
return mFetchOptions->mParserMetadata;
|
||||
}
|
||||
|
||||
const nsString& Nonce() const { return mFetchOptions->mNonce; }
|
||||
|
||||
nsIPrincipal* TriggeringPrincipal() const {
|
||||
return mFetchOptions->mTriggeringPrincipal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user