Bug 1160345 - Set toolbox button visibility before consulting with the GCLI actor (which may not be available on old servers);r=jryans
authorBrian Grinstead <bgrinstead@mozilla.com>
Fri, 01 May 2015 13:01:38 -0700
changeset 273490 f9996ba3e1c034913d2ba0e646da89e8ebea34f1
parent 273489 1cddfc7f855f35269cc2107a42ed564145d7e3f7
child 273491 d58edbe9f92211e8f2af9761aefa13e1f8da7683
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1160345
milestone40.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 1160345 - Set toolbox button visibility before consulting with the GCLI actor (which may not be available on old servers);r=jryans
browser/devtools/framework/toolbox.js
--- a/browser/devtools/framework/toolbox.js
+++ b/browser/devtools/framework/toolbox.js
@@ -712,16 +712,20 @@ Toolbox.prototype = {
   /**
    * Add buttons to the UI as specified in the devtools.toolbox.toolbarSpec pref
    */
   _buildButtons: function() {
     if (!this.target.isAddon) {
       this._buildPickerButton();
     }
 
+    // Set the visibility of the built in buttons before adding more buttons
+    // so they are shown before calling into the GCLI actor.
+    this.setToolboxButtonsVisibility();
+
     const options = {
       environment: CommandUtils.createEnvironment(this, '_target')
     };
     return CommandUtils.createRequisition(this.target, options).then(requisition => {
       this._requisition = requisition;
 
       const spec = CommandUtils.getCommandbarSpec("devtools.toolbox.toolbarSpec");
       return CommandUtils.createButtons(spec, this.target, this.doc,