Bug 1761938 - Part 6: Remove global from script load context r=smaug,yulia

This removes the global object field from the script load context and gets the
global from the script loader / module loader where necessary.

Differential Revision: https://phabricator.services.mozilla.com/D142833
This commit is contained in:
Jon Coppeard
2022-04-11 15:35:30 +00:00
parent 42de261a2e
commit 2a22044473
10 changed files with 52 additions and 68 deletions

View File

@@ -77,8 +77,7 @@ class ScriptFetchOptions {
ScriptFetchOptions(mozilla::CORSMode aCORSMode,
enum mozilla::dom::ReferrerPolicy aReferrerPolicy,
nsIPrincipal* aTriggeringPrincipal,
nsIGlobalObject* aWebExtGlobal = nullptr);
nsIPrincipal* aTriggeringPrincipal);
/*
* The credentials mode used for the initial fetch (for module scripts)
@@ -97,12 +96,6 @@ class ScriptFetchOptions {
* Related to cryptographic nonce, used to determine CSP
*/
nsCOMPtr<nsIPrincipal> mTriggeringPrincipal;
/* The Web Extension global -- Only used on DOM Modules.
* Specifies a SandBox global with which to associate and run this script.
* Propagated throughout the module tree if present. Not part of a spec.
*/
nsCOMPtr<nsIGlobalObject> mWebExtGlobal;
};
/*