Skip to content

Commit

Permalink
Bug 861908 - While unregistering, first destroy the tool, then remove…
Browse files Browse the repository at this point in the history
… its panel from toolbox, r=jwalker

Bug 861908 - While unregistering, first destroy the tool, then remove its panel from toolbox, r=jwalker
  • Loading branch information
grssam committed Apr 17, 2013
1 parent 651b17f commit 5746570
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions browser/devtools/framework/Toolbox.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,12 @@ Toolbox.prototype = {
* Id of the tool that was unregistered
*/
_toolUnregistered: function TBOX_toolUnregistered(event, toolId) {
if (this._toolPanels.has(toolId)) {
let instance = this._toolPanels.get(toolId);
instance.destroy();
this._toolPanels.delete(toolId);
}

let radio = this.doc.getElementById("toolbox-tab-" + toolId);
let panel = this.doc.getElementById("toolbox-panel-" + toolId);

Expand Down Expand Up @@ -704,12 +710,6 @@ Toolbox.prototype = {
key.parentNode.removeChild(key);
}
}

if (this._toolPanels.has(toolId)) {
let instance = this._toolPanels.get(toolId);
instance.destroy();
this._toolPanels.delete(toolId);
}
},


Expand Down

0 comments on commit 5746570

Please sign in to comment.