summaryrefslogtreecommitdiffstats
path: root/devtools/shared/loader/builtin-modules.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/shared/loader/builtin-modules.js')
-rw-r--r--devtools/shared/loader/builtin-modules.js26
1 files changed, 16 insertions, 10 deletions
diff --git a/devtools/shared/loader/builtin-modules.js b/devtools/shared/loader/builtin-modules.js
index 7dc04e5e98..ced6978d6f 100644
--- a/devtools/shared/loader/builtin-modules.js
+++ b/devtools/shared/loader/builtin-modules.js
@@ -125,7 +125,8 @@ defineLazyGetter(exports.modules, "Debugger", () => {
return global.Debugger;
}
const { addDebuggerToGlobal } = ChromeUtils.importESModule(
- "resource://gre/modules/jsdebugger.sys.mjs"
+ "resource://gre/modules/jsdebugger.sys.mjs",
+ { global: "contextual" }
);
addDebuggerToGlobal(global);
return global.Debugger;
@@ -141,7 +142,8 @@ defineLazyGetter(exports.modules, "ChromeDebugger", () => {
});
const { addDebuggerToGlobal } = ChromeUtils.importESModule(
- "resource://gre/modules/jsdebugger.sys.mjs"
+ "resource://gre/modules/jsdebugger.sys.mjs",
+ { global: "contextual" }
);
addDebuggerToGlobal(debuggerSandbox);
return debuggerSandbox.Debugger;
@@ -183,20 +185,24 @@ function lazyGlobal(name, getter) {
// Lazily define a few things so that the corresponding modules are only loaded
// when used.
lazyGlobal("clearTimeout", () => {
- return ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs")
- .clearTimeout;
+ return ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs", {
+ global: "contextual",
+ }).clearTimeout;
});
lazyGlobal("setTimeout", () => {
- return ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs")
- .setTimeout;
+ return ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs", {
+ global: "contextual",
+ }).setTimeout;
});
lazyGlobal("clearInterval", () => {
- return ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs")
- .clearInterval;
+ return ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs", {
+ global: "contextual",
+ }).clearInterval;
});
lazyGlobal("setInterval", () => {
- return ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs")
- .setInterval;
+ return ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs", {
+ global: "contextual",
+ }).setInterval;
});
lazyGlobal("WebSocket", () => {
return Services.appShell.hiddenDOMWindow.WebSocket;