Bug 1094968 - Skip tilt visibility for remote toolboxes. r=mratcliffe
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 06 Nov 2014 12:56:21 -0600
changeset 226485 e908c7528d69a4c06a7edc9a44b45debbb483a1b
parent 226484 c371b8e04118f009860dabbdbaca472f61249f99
child 226486 da9faa259da1105ad9ea691c2bffc33286426b1a
push id53
push userdglastonbury@mozilla.com
push dateWed, 12 Nov 2014 02:04:58 +0000
reviewersmratcliffe
bugs1094968
milestone36.0a1
Bug 1094968 - Skip tilt visibility for remote toolboxes. r=mratcliffe
browser/devtools/framework/toolbox.js
--- a/browser/devtools/framework/toolbox.js
+++ b/browser/devtools/framework/toolbox.js
@@ -756,16 +756,20 @@ Toolbox.prototype = {
       }
     });
 
     // Tilt is handled separately because it is disabled in E10S mode. Because
     // we have removed tilt from toolboxButtons we have to deal with it here.
     let tiltEnabled = !this.target.isMultiProcess &&
                       Services.prefs.getBoolPref("devtools.command-button-tilt.enabled");
     let tiltButton = this.doc.getElementById("command-button-tilt");
+    // Remote toolboxes don't add the button to the DOM at all
+    if (!tiltButton) {
+      return;
+    }
 
     if (tiltEnabled) {
       tiltButton.removeAttribute("hidden");
     } else {
       tiltButton.setAttribute("hidden", "true");
     }
   },