summaryrefslogtreecommitdiffstats
path: root/devtools/shared/loader/base-loader.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/shared/loader/base-loader.sys.mjs')
-rw-r--r--devtools/shared/loader/base-loader.sys.mjs15
1 files changed, 11 insertions, 4 deletions
diff --git a/devtools/shared/loader/base-loader.sys.mjs b/devtools/shared/loader/base-loader.sys.mjs
index b9d625f3e3..ab005b81e2 100644
--- a/devtools/shared/loader/base-loader.sys.mjs
+++ b/devtools/shared/loader/base-loader.sys.mjs
@@ -20,9 +20,13 @@ XPCOMUtils.defineLazyServiceGetter(
"nsIResProtocolHandler"
);
-ChromeUtils.defineESModuleGetters(lazy, {
- NetUtil: "resource://gre/modules/NetUtil.sys.mjs",
-});
+ChromeUtils.defineESModuleGetters(
+ lazy,
+ {
+ NetUtil: "resource://gre/modules/NetUtil.sys.mjs",
+ },
+ { global: "contextual" }
+);
// Define some shortcuts.
function* getOwnIdentifiers(x) {
@@ -115,6 +119,7 @@ function Sandbox(options) {
"ChromeUtils",
"CSS",
"CSSRule",
+ "CustomStateSet",
"DOMParser",
"Element",
"Event",
@@ -336,7 +341,9 @@ export function Require(loader, requirer) {
module.exports = ChromeUtils.import(uri);
} else if (isSYSMJSURI(uri)) {
module = modules[uri] = Module(requirement, uri);
- module.exports = ChromeUtils.importESModule(uri);
+ module.exports = ChromeUtils.importESModule(uri, {
+ global: "contextual",
+ });
} else if (isJSONURI(uri)) {
let data;