diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /devtools/server/actors/resources/jstracer-state.js | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/server/actors/resources/jstracer-state.js')
-rw-r--r-- | devtools/server/actors/resources/jstracer-state.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/devtools/server/actors/resources/jstracer-state.js b/devtools/server/actors/resources/jstracer-state.js index 74491a6ced..1bb4723b55 100644 --- a/devtools/server/actors/resources/jstracer-state.js +++ b/devtools/server/actors/resources/jstracer-state.js @@ -8,13 +8,10 @@ const { TYPES: { JSTRACER_STATE }, } = require("resource://devtools/server/actors/resources/index.js"); -// Bug 1827382, as this module can be used from the worker thread, -// the following JSM may be loaded by the worker loader until -// we have proper support for ESM from workers. -const { - addTracingListener, - removeTracingListener, -} = require("resource://devtools/server/tracer/tracer.jsm"); +const { JSTracer } = ChromeUtils.importESModule( + "resource://devtools/server/tracer/tracer.sys.mjs", + { global: "contextual" } +); const { LOG_METHODS } = require("resource://devtools/server/actors/tracer.js"); const Targets = require("resource://devtools/server/actors/targets/index.js"); @@ -42,7 +39,7 @@ class TracingStateWatcher { this.tracingListener = { onTracingToggled: this.onTracingToggled.bind(this), }; - addTracingListener(this.tracingListener); + JSTracer.addTracingListener(this.tracingListener); } /** @@ -52,7 +49,7 @@ class TracingStateWatcher { if (!this.tracingListener) { return; } - removeTracingListener(this.tracingListener); + JSTracer.removeTracingListener(this.tracingListener); } /** |