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/thread.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/thread.js')
-rw-r--r-- | devtools/server/actors/thread.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/devtools/server/actors/thread.js b/devtools/server/actors/thread.js index 07dcc27a6a..0042e76a2a 100644 --- a/devtools/server/actors/thread.js +++ b/devtools/server/actors/thread.js @@ -418,12 +418,6 @@ class ThreadActor extends Actor { this.alreadyAttached = true; this.dbg.enable(); - // Notify the target actor that we've finished attaching. If this is a worker - // thread which was paused until attaching, this will allow content to - // begin executing. - if (this.targetActor.onThreadAttached) { - this.targetActor.onThreadAttached(); - } if (Services.obs) { // Set a wrappedJSObject property so |this| can be sent via the observer service // for the xpcshell harness. @@ -535,6 +529,13 @@ class ThreadActor extends Actor { } async setBreakpoint(location, options) { + // Automatically initialize the thread actor if it wasn't yet done. + // Note that ideally, it should rather be done via reconfigure/thread configuration. + if (this._state === STATES.DETACHED) { + this.attach({}); + this.addAllSources(); + } + let actor = this.breakpointActorMap.get(location); // Avoid resetting the exact same breakpoint twice if (actor && JSON.stringify(actor.options) == JSON.stringify(options)) { @@ -597,7 +598,9 @@ class ThreadActor extends Actor { } getAvailableEventBreakpoints() { - return getAvailableEventBreakpoints(this.targetActor.window); + return getAvailableEventBreakpoints( + this.targetActor.window || this.targetActor.workerGlobal + ); } getActiveEventBreakpoints() { return Array.from(this._activeEventBreakpoints); |