diff --git a/application/basilisk/app/profile/basilisk.js b/application/basilisk/app/profile/basilisk.js index bb2e345df8..80a7127652 100644 --- a/application/basilisk/app/profile/basilisk.js +++ b/application/basilisk/app/profile/basilisk.js @@ -923,6 +923,11 @@ pref("dom.ipc.shims.enabledWarnings", false); // Start the browser in e10s mode pref("browser.tabs.remote.autostart", true); pref("browser.tabs.remote.desktopbehavior", true); +pref("browser.tabs.remote.ignoreBlockPolicy", true); +// -1 means automatic tab-isolation mode: try one process per tab. +pref("dom.ipc.processCount", -1); +// Safety ceiling used by automatic tab-isolation mode. +pref("dom.ipc.processCount.webIsolatedMax", 64); // This pref governs whether we attempt to work around problems caused by // plugins using OS calls to manipulate the cursor while running out-of- @@ -1245,10 +1250,8 @@ pref("browser.tabs.remote.autostart.2", true); pref("extensions.interposition.enabled", true); pref("extensions.interposition.prefetching", true); -// Enable blocking of e10s for add-on users on beta/release. -#ifdef RELEASE_OR_BETA -pref("extensions.e10sBlocksEnabling", true); -#endif +// Keep e10s enabled even when legacy add-ons are present. +pref("extensions.e10sBlocksEnabling", false); // How often to check for CPOW timeouts. CPOWs are only timed out by // the hang monitor. diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 6dab0bbc82..8577af7b8c 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -574,6 +574,7 @@ ContentParent::GetNewOrUsedBrowserProcess(bool aForBrowserElement, { nsTArray* contentParents; int32_t maxContentParents; + bool preferDedicatedProcess = false; // Decide which pool of content parents we are going to be pulling from based // on the aLargeAllocationProcess flag. @@ -591,13 +592,20 @@ ContentParent::GetNewOrUsedBrowserProcess(bool aForBrowserElement, contentParents = sBrowserContentParents; maxContentParents = Preferences::GetInt("dom.ipc.processCount", 1); + if (maxContentParents == -1) { + // Automatic mode: create a dedicated content process per new tab until + // a safety ceiling is reached, then reuse existing processes. + preferDedicatedProcess = true; + maxContentParents = Preferences::GetInt("dom.ipc.processCount.webIsolatedMax", 64); + } } if (maxContentParents < 1) { maxContentParents = 1; } - if (contentParents->Length() >= uint32_t(maxContentParents)) { + if (!preferDedicatedProcess || + contentParents->Length() >= uint32_t(maxContentParents)) { uint32_t maxSelectable = std::min(static_cast(contentParents->Length()), static_cast(maxContentParents)); uint32_t startIdx = rand() % maxSelectable; diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 25ba3528d6..c04b8f6034 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -4203,6 +4203,12 @@ MultiprocessBlockPolicy() { } gMultiprocessBlockPolicyInitialized = true; + // Allow downstream applications to bypass legacy e10s block policies. + // This is evaluated at startup and requires restart to take effect. + if (Preferences::GetBool("browser.tabs.remote.ignoreBlockPolicy", false)) { + return gMultiprocessBlockPolicy; + } + /** * Avoids enabling e10s if there are add-ons installed. */