diff --git a/devtools/shared/client/deprecated-thread-client.js b/devtools/shared/client/deprecated-thread-client.js index 521fb37bab55..6178ef5c61b2 100644 --- a/devtools/shared/client/deprecated-thread-client.js +++ b/devtools/shared/client/deprecated-thread-client.js @@ -37,6 +37,7 @@ function ThreadClient(client, actor) { this._actor = actor; this._pauseGrips = {}; this._threadGrips = {}; + this.targetFront = null; this.request = this.client.request; } @@ -235,6 +236,7 @@ ThreadClient.prototype = { }), destroy: function() { + this.targetFront = null; return this.detach(); }, diff --git a/devtools/shared/fronts/targets/target-mixin.js b/devtools/shared/fronts/targets/target-mixin.js index 05313e497786..bd8017d466ca 100644 --- a/devtools/shared/fronts/targets/target-mixin.js +++ b/devtools/shared/fronts/targets/target-mixin.js @@ -417,6 +417,7 @@ function TargetMixin(parentClass) { this.threadFront = new ThreadClient(this._client, this._threadActor); this.fronts.set("thread", this.threadFront); this.threadFront.actorID = this._threadActor; + this.threadFront.targetFront = this; this.manage(this.threadFront); } const result = await this.threadFront.attach(options);