Skip to content

Commit

Permalink
Bug 1063156 - Enable e10s shims by default, even when browser.tabs.re…
Browse files Browse the repository at this point in the history
…mote.autostart pref is false.r=billm
  • Loading branch information
Allison Naaktgeboren committed Nov 1, 2014
1 parent 7bd9b67 commit 7c31ba0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 3 additions & 2 deletions toolkit/mozapps/extensions/internal/XPIProvider.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -4282,12 +4282,13 @@ this.XPIProvider = {

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] =
Expand Down
3 changes: 3 additions & 0 deletions toolkit/mozapps/extensions/internal/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ EXTRA_JS_MODULES.addons += [
'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 += [
Expand Down
3 changes: 3 additions & 0 deletions toolkit/xre/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ if CONFIG['MOZ_UPDATER']:

MSVC_ENABLE_PGO = True

if CONFIG['MOZ_BUILD_APP'] in ['browser']:
DEFINES['HAVE_SHIMS'] = True

include('/ipc/chromium/chromium-config.mozbuild')

FINAL_LIBRARY = 'xul'
Expand Down
5 changes: 2 additions & 3 deletions toolkit/xre/nsXREDirProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,7 @@ nsXREDirProvider::GetFiles(const char* aProperty, nsISimpleEnumerator** aResult)
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");

Expand All @@ -572,6 +570,7 @@ RegisterExtensionInterpositions(nsINIParser &parser)
continue;
}
while (true);
#endif
}

static void
Expand Down

0 comments on commit 7c31ba0

Please sign in to comment.