Bug 1026093 - Don't allow the user to open an e10s window in safe mode r=mconley
authorGeorge Wright <george@mozilla.com>
Thu, 19 Feb 2015 15:11:24 -0500
changeset 229943 d64f901863d6908e409913a7ce1ae231c34769c7
parent 229926 51458a066fda3375cf6abecca6bc3da61be56f70
child 229944 1c7760c72b583da925ffe351fc4fec9e32717a77
push id28304
push usercbook@mozilla.com
push dateFri, 20 Feb 2015 14:15:44 +0000
treeherdermozilla-central@5f1009731a97 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1026093
milestone38.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 1026093 - Don't allow the user to open an e10s window in safe mode r=mconley
browser/base/content/browser.js
browser/components/customizableui/CustomizableWidgets.jsm
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -7414,16 +7414,21 @@ let gPrivateBrowsingUI = {
 let gRemoteTabsUI = {
   init: function() {
     if (window.location.href != getBrowserURL() &&
         // Also check hidden window for the Mac no-window case
         window.location.href != "chrome://browser/content/hiddenWindow.xul") {
       return;
     }
 
+    if (Services.appinfo.inSafeMode) {
+      // e10s isn't supported in safe mode, so don't show the menu items for it
+      return;
+    }
+
     let newRemoteWindow = document.getElementById("menu_newRemoteWindow");
     let newNonRemoteWindow = document.getElementById("menu_newNonRemoteWindow");
     let autostart = Services.appinfo.browserTabsRemoteAutostart;
     newRemoteWindow.hidden = autostart;
     newNonRemoteWindow.hidden = !autostart;
   }
 };
 
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -1071,12 +1071,13 @@ let openRemote = !Services.appinfo.brows
 // this button should never roll into production.
 let buttonLabel = openRemote ? "New e10s Window"
                               : "New Non-e10s Window";
 
 CustomizableWidgets.push({
   id: "e10s-button",
   label: buttonLabel,
   tooltiptext: buttonLabel,
+  disabled: Services.appinfo.inSafeMode,
   defaultArea: CustomizableUI.AREA_PANEL,
   onCommand: getCommandFunction(openRemote),
 });
 #endif