summaryrefslogtreecommitdiffstats
path: root/devtools/server/actors/accessibility/audit/contrast.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/server/actors/accessibility/audit/contrast.js')
-rw-r--r--devtools/server/actors/accessibility/audit/contrast.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/devtools/server/actors/accessibility/audit/contrast.js b/devtools/server/actors/accessibility/audit/contrast.js
index 68e7b497f8..95510be4fc 100644
--- a/devtools/server/actors/accessibility/audit/contrast.js
+++ b/devtools/server/actors/accessibility/audit/contrast.js
@@ -42,15 +42,17 @@ loader.lazyRequireGetter(
);
loader.lazyRequireGetter(
this,
- "DevToolsWorker",
- "resource://devtools/shared/worker/worker.js",
- true
-);
-loader.lazyRequireGetter(
- this,
"InspectorActorUtils",
"resource://devtools/server/actors/inspector/utils.js"
);
+const lazy = {};
+ChromeUtils.defineESModuleGetters(
+ lazy,
+ {
+ DevToolsWorker: "resource://devtools/shared/worker/worker.sys.mjs",
+ },
+ { global: "contextual" }
+);
const WORKER_URL = "resource://devtools/server/actors/accessibility/worker.js";
const HIGHLIGHTED_PSEUDO_CLASS = ":-moz-devtools-highlighted";
@@ -58,7 +60,7 @@ const {
LARGE_TEXT: { BOLD_LARGE_TEXT_MIN_PIXELS, LARGE_TEXT_MIN_PIXELS },
} = require("resource://devtools/shared/accessibility.js");
-loader.lazyGetter(this, "worker", () => new DevToolsWorker(WORKER_URL));
+loader.lazyGetter(this, "worker", () => new lazy.DevToolsWorker(WORKER_URL));
/**
* Get canvas rendering context for the current target window bound by the bounds of the