diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /devtools/server/actors/webconsole | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/server/actors/webconsole')
-rw-r--r-- | devtools/server/actors/webconsole/commands/manager.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/devtools/server/actors/webconsole/commands/manager.js b/devtools/server/actors/webconsole/commands/manager.js index 025e197e3b..e96e0a617f 100644 --- a/devtools/server/actors/webconsole/commands/manager.js +++ b/devtools/server/actors/webconsole/commands/manager.js @@ -11,13 +11,6 @@ loader.lazyRequireGetter( true ); -loader.lazyRequireGetter( - this, - ["DOM_MUTATIONS"], - "resource://devtools/server/tracer/tracer.jsm", - true -); - loader.lazyGetter(this, "l10n", () => { return new Localization( [ @@ -27,6 +20,16 @@ loader.lazyGetter(this, "l10n", () => { true ); }); + +const lazy = {}; +ChromeUtils.defineESModuleGetters( + lazy, + { + JSTracer: "resource://devtools/server/tracer/tracer.sys.mjs", + }, + { global: "contextual" } +); + const USAGE_STRING_MAPPING = { block: "webconsole-commands-usage-block", trace: "webconsole-commands-usage-trace3", @@ -888,7 +891,7 @@ WebConsoleCommandsManager.register({ } else if (typeof args["dom-mutations"] == "string") { // Otherwise consider the value as coma seperated list and remove any white space. traceDOMMutations = args["dom-mutations"].split(",").map(e => e.trim()); - const acceptedValues = Object.values(DOM_MUTATIONS); + const acceptedValues = Object.values(lazy.JSTracer.DOM_MUTATIONS); if (!traceDOMMutations.every(e => acceptedValues.includes(e))) { throw new Error( `:trace --dom-mutations only accept a list of strings whose values can be: ${acceptedValues}` |