Bug 1499710 - Remove autohideOnDestroy trait; r=ochameau
authoryulia <ystartsev@mozilla.com>
Thu, 18 Oct 2018 14:10:59 +0000
changeset 490310 f95e8040037226253522aea53a8b24dee6b75098
parent 490309 42a7995a7d3655675925610c92fe13c9b86cd7ec
child 490311 88aa6ae72305247b0520e0d698e751749fb8d60b
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersochameau
bugs1499710
milestone64.0a1
Bug 1499710 - Remove autohideOnDestroy trait; r=ochameau Depends on D8987 Differential Revision: https://phabricator.services.mozilla.com/D8988
devtools/client/framework/toolbox.js
devtools/server/actors/highlighters.js
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -2762,24 +2762,16 @@ Toolbox.prototype = {
       } else {
         await this.highlighterUtils.stopPicker();
       }
       // Temporary fix for bug #1493131 - inspector has a different life cycle
       // than most other fronts because it is closely related to the toolbox.
       this._inspector.destroy();
 
       if (this._highlighter) {
-        // Note that if the toolbox is closed, this will work fine, but will fail
-        // in case the browser is closed and will trigger a noSuchActor message.
-        // We ignore the promise that |_hideBoxModel| returns, since we should still
-        // proceed with the rest of destruction if it fails.
-        // FF42+ now does the cleanup from the actor.
-        if (!this.highlighter.traits.autoHideOnDestroy) {
-          this.highlighterUtils.unhighlight();
-        }
         await this._highlighter.destroy();
       }
       if (this._selection) {
         this._selection.off("new-node-front", this._onNewSelectedNodeFront);
         this._selection.destroy();
       }
 
       if (this.walker) {
--- a/devtools/server/actors/highlighters.js
+++ b/devtools/server/actors/highlighters.js
@@ -108,19 +108,16 @@ exports.HighlighterActor = protocol.Acto
 
   get conn() {
     return this._inspector && this._inspector.conn;
   },
 
   form: function() {
     return {
       actor: this.actorID,
-      traits: {
-        autoHideOnDestroy: true
-      }
     };
   },
 
   _createHighlighter: function() {
     this._isPreviousWindowXUL = isXUL(this._targetActor.window);
 
     if (!this._isPreviousWindowXUL) {
       this._highlighter = new BoxModelHighlighter(this._highlighterEnv,