From d58782e82b748150a8b6a5d4353763544c846949 Mon Sep 17 00:00:00 2001 From: Joe Walker Date: Fri, 4 Jan 2013 20:31:38 +0000 Subject: [PATCH] Bug 820436 - Buttons are unresponsive after previously closing the Developer Tools Window; r=paul --- browser/devtools/framework/Toolbox.jsm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/browser/devtools/framework/Toolbox.jsm b/browser/devtools/framework/Toolbox.jsm index 3e1fd33a1f38..e28354c9bd64 100644 --- a/browser/devtools/framework/Toolbox.jsm +++ b/browser/devtools/framework/Toolbox.jsm @@ -260,7 +260,7 @@ Toolbox.prototype = { this._buildDockButtons(); this._buildTabs(); - this._buildButtons(this.frame); + this._buildButtons(); this.selectTool(this._defaultToolId).then(function(panel) { this.emit("ready"); @@ -322,17 +322,14 @@ Toolbox.prototype = { /** * Add buttons to the UI as specified in the devtools.window.toolbarSpec pref - * - * @param {iframe} frame - * The iframe to contain the buttons */ - _buildButtons: function TBOX_buildButtons(frame) { - if (this.target.isRemote) { + _buildButtons: function TBOX_buildButtons() { + if (!this.target.isLocalTab) { return; } let toolbarSpec = CommandUtils.getCommandbarSpec("devtools.toolbox.toolbarSpec"); - let environment = { chromeDocument: frame.ownerDocument }; + let environment = { chromeDocument: this.target.tab.ownerDocument }; let requisition = new Requisition(environment); let buttons = CommandUtils.createButtons(toolbarSpec, this._target, this.doc, requisition);