Bug 1126311 - Don't show OMTC warning when opening windows on Linux if e10s enabled by default. r=felipe.
authorMike Conley <mconley@mozilla.com>
Wed, 28 Jan 2015 14:15:40 -0500
changeset 239733 7513395c7d1b4fb3bd02a8c76ed1bc2fd95311e1
parent 239732 7f684fa2c9d9e95e872dbab09a7d289aaef5641c
child 239734 42750f461e9538db90ba895b458ab4e497198007
push id506
push usermleibovic@mozilla.com
push dateThu, 29 Jan 2015 12:40:10 +0000
reviewersfelipe
bugs1126311
milestone38.0a1
Bug 1126311 - Don't show OMTC warning when opening windows on Linux if e10s enabled by default. r=felipe.
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3867,17 +3867,20 @@ function OpenBrowserWindow(options)
       // Force the new window to load about:privatebrowsing instead of the default home page
       defaultArgs = "about:privatebrowsing";
     }
   } else {
     extraFeatures = ",non-private";
   }
 
   if (options && options.remote) {
-    let omtcEnabled = gPrefService.getBoolPref("layers.offmainthreadcomposition.enabled");
+    // If we're using remote tabs by default, then OMTC will be force-enabled,
+    // despite the preference returning as false.
+    let omtcEnabled = gPrefService.getBoolPref("layers.offmainthreadcomposition.enabled")
+                      || Services.appinfo.browserTabsRemoteAutostart;
     if (!omtcEnabled) {
       alert("To use out-of-process tabs, you must set the layers.offmainthreadcomposition.enabled preference and restart. Opening a normal window instead.");
     } else {
       extraFeatures += ",remote";
     }
   } else if (options && options.remote === false) {
     extraFeatures += ",non-remote";
   }