Bug 820436 - Buttons are unresponsive after previously closing the Developer Tools Window; r=paul
authorJoe Walker <jwalker@mozilla.com>
Fri, 04 Jan 2013 20:31:38 +0000
changeset 126694 a2754cd8e66bc69f4da09198a5ceb17687cdd212
parent 126693 8e081520799921a55b2879460c44287330c4b47a
child 126695 2fce7807dc841a18adb8e17e896d45bdedce0aa7
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaul
bugs820436
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 820436 - Buttons are unresponsive after previously closing the Developer Tools Window; r=paul
browser/devtools/framework/Toolbox.jsm
--- a/browser/devtools/framework/Toolbox.jsm
+++ b/browser/devtools/framework/Toolbox.jsm
@@ -255,17 +255,17 @@ Toolbox.prototype = {
 
         this.isReady = true;
 
         let closeButton = this.doc.getElementById("toolbox-close");
         closeButton.addEventListener("command", this.destroy, true);
 
         this._buildDockButtons();
         this._buildTabs();
-        this._buildButtons(this.frame);
+        this._buildButtons();
 
         this.selectTool(this._defaultToolId).then(function(panel) {
           this.emit("ready");
           deferred.resolve();
         }.bind(this));
       }.bind(this);
 
       iframe.addEventListener("DOMContentLoaded", domReady, true);
@@ -317,27 +317,24 @@ Toolbox.prototype = {
   _buildTabs: function TBOX_buildTabs() {
     for (let [id, definition] of gDevTools.getToolDefinitions()) {
       this._buildTabForTool(definition);
     }
   },
 
   /**
    * 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);
 
     let container = this.doc.getElementById("toolbox-buttons");
     buttons.forEach(function(button) {
       container.appendChild(button);
     }.bind(this));