From 723a427a35134cb81d4c9ff1db6e9b397a6ed5e0 Mon Sep 17 00:00:00 2001 From: yulia Date: Mon, 19 Aug 2019 15:10:36 +0000 Subject: [PATCH] Bug 1573780 - add targetFront to deprecated debugger client; r=jlast Differential Revision: https://phabricator.services.mozilla.com/D42497 --HG-- extra : moz-landing-system : lando --- devtools/shared/client/deprecated-thread-client.js | 2 ++ devtools/shared/fronts/targets/target-mixin.js | 1 + 2 files changed, 3 insertions(+) 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);