Bug 1063156 - Enable e10s shims by default, even when browser.tabs.remote.autostart pref is false.r=billm
authorAllison Naaktgeboren <ally@mozilla.com>
Fri, 31 Oct 2014 17:44:58 -0700
changeset 213527 c6d53703d44944687ee1b542289ae2e02b859479
parent 213526 018d3b2ba7bfd52899f447083e512119850f2a19
child 213528 019609619a48bdf303c26de0e2a68d291c2c04a8
push id27754
push userphilringnalda@gmail.com
push dateSun, 02 Nov 2014 16:56:35 +0000
treeherdermozilla-central@6ca3405c22e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1063156
milestone36.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 1063156 - Enable e10s shims by default, even when browser.tabs.remote.autostart pref is false.r=billm
toolkit/mozapps/extensions/internal/XPIProvider.jsm
toolkit/mozapps/extensions/internal/moz.build
toolkit/xre/moz.build
toolkit/xre/nsXREDirProvider.cpp
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -4277,22 +4277,23 @@ this.XPIProvider = {
       this.bootstrapScopes[aId] = null;
       return;
     }
 
     logger.debug("Loading bootstrap scope from " + aFile.path);
 
     let principal = Cc["@mozilla.org/systemprincipal;1"].
                     createInstance(Ci.nsIPrincipal);
-
-    if (!aMultiprocessCompatible && Services.appinfo.browserTabsRemoteAutostart) {
+#if defined(NIGHTLY_BUILD) && defined(HAVE_SHIMS)
+    if (!aMultiprocessCompatible) {
       let interposition = Cc["@mozilla.org/addons/multiprocess-shims;1"].
         getService(Ci.nsIAddonInterposition);
       Cu.setAddonInterposition(aId, interposition);
     }
+#endif
 
     if (!aFile.exists()) {
       this.bootstrapScopes[aId] =
         new Cu.Sandbox(principal, { sandboxName: aFile.path,
                                     wantGlobalProperties: ["indexedDB"],
                                     addonId: aId,
                                     metadata: { addonID: aId } });
       logger.error("Attempted to load bootstrap scope from missing directory " + aFile.path);
--- a/toolkit/mozapps/extensions/internal/moz.build
+++ b/toolkit/mozapps/extensions/internal/moz.build
@@ -9,16 +9,19 @@ EXTRA_JS_MODULES.addons += [
     'AddonRepository.jsm',
     'AddonRepository_SQLiteMigrator.jsm',
     'AddonUpdateChecker.jsm',
     'Content.js',
     'LightweightThemeImageOptimizer.jsm',
     'SpellCheckDictionaryBootstrap.js',
 ]
 
+if CONFIG['MOZ_BUILD_APP'] in ['browser']:
+      DEFINES['HAVE_SHIMS'] = True
+
 # Don't ship unused providers on Android
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
     EXTRA_JS_MODULES.addons += [
         'OpenH264Provider.jsm',
         'PluginProvider.jsm',
     ]
 
 EXTRA_PP_JS_MODULES.addons += [
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -100,16 +100,19 @@ if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
 if CONFIG['MOZ_UPDATER']:
     if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
         UNIFIED_SOURCES += [
             'nsUpdateDriver.cpp',
         ]
 
 MSVC_ENABLE_PGO = True
 
+if CONFIG['MOZ_BUILD_APP'] in ['browser']:
+      DEFINES['HAVE_SHIMS'] = True
+
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['MOZ_GL_DEFAULT_PROVIDER'] == 'GLX':
     DEFINES['USE_GLX_TEST'] = True
 
 for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_VERSION', 'OS_TARGET',
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -546,19 +546,17 @@ nsXREDirProvider::GetFiles(const char* a
     return rv;
 
   return NS_SUCCESS_AGGREGATE_RESULT;
 }
 
 static void
 RegisterExtensionInterpositions(nsINIParser &parser)
 {
-  if (!mozilla::BrowserTabsRemoteAutostart())
-    return;
-
+#if defined(NIGHTLY_BUILD) && defined(HAVE_SHIMS)
   nsCOMPtr<nsIAddonInterposition> interposition =
     do_GetService("@mozilla.org/addons/multiprocess-shims;1");
 
   nsresult rv;
   int32_t i = 0;
   do {
     nsAutoCString buf("Extension");
     buf.AppendInt(i++);
@@ -567,16 +565,17 @@ RegisterExtensionInterpositions(nsINIPar
     rv = parser.GetString("MultiprocessIncompatibleExtensions", buf.get(), addonId);
     if (NS_FAILED(rv))
       return;
 
     if (!xpc::SetAddonInterposition(addonId, interposition))
       continue;
   }
   while (true);
+#endif
 }
 
 static void
 LoadExtensionDirectories(nsINIParser &parser,
                          const char *aSection,
                          nsCOMArray<nsIFile> &aDirectories,
                          NSLocationType aType)
 {