mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1063848 - Disable e10s in safe mode. r=bsmedberg,ally.
This commit is contained in:
parent
6d658e2858
commit
3a6a843e37
@ -6885,8 +6885,8 @@ let gRemoteTabsUI = {
|
||||
return;
|
||||
}
|
||||
|
||||
let remoteTabs = gPrefService.getBoolPref("browser.tabs.remote");
|
||||
let autostart = gPrefService.getBoolPref("browser.tabs.remote.autostart");
|
||||
let remoteTabs = Services.appinfo.browserTabsRemote;
|
||||
let autostart = Services.appinfo.browserTabsRemoteAutostart;
|
||||
|
||||
let newRemoteWindow = document.getElementById("menu_newRemoteWindow");
|
||||
let newNonRemoteWindow = document.getElementById("menu_newNonRemoteWindow");
|
||||
|
@ -964,7 +964,7 @@ if (Services.prefs.getBoolPref("browser.tabs.remote")) {
|
||||
};
|
||||
}
|
||||
|
||||
let openRemote = !Services.prefs.getBoolPref("browser.tabs.remote.autostart");
|
||||
let openRemote = !Services.appinfo.browserTabsRemoteAutostart;
|
||||
// Like the XUL menuitem counterparts, we hard-code these strings in because
|
||||
// this button should never roll into production.
|
||||
let buttonLabel = openRemote ? "New e10s Window"
|
||||
|
@ -1448,7 +1448,7 @@ uint32_t nsWindowWatcher::CalculateChromeFlags(nsIDOMWindow *aParent,
|
||||
// Determine whether the window should have remote tabs.
|
||||
if (isCallerChrome || aOpenedFromRemoteTab) {
|
||||
bool remote;
|
||||
if (Preferences::GetBool("browser.tabs.remote.autostart")) {
|
||||
if (BrowserTabsRemoteAutostart()) {
|
||||
remote = !WinHasOption(aFeatures, "non-remote", 0, &presenceFlag);
|
||||
} else {
|
||||
remote = WinHasOption(aFeatures, "remote", 0, &presenceFlag);
|
||||
|
@ -1944,7 +1944,7 @@ InitLayersAccelerationPrefs()
|
||||
MOZ_ASSERT(NS_IsMainThread(), "can only initialize prefs on the main thread");
|
||||
|
||||
gfxPrefs::GetSingleton();
|
||||
sPrefBrowserTabsRemoteAutostart = Preferences::GetBool("browser.tabs.remote.autostart", false);
|
||||
sPrefBrowserTabsRemoteAutostart = BrowserTabsRemoteAutostart();
|
||||
|
||||
#ifdef XP_WIN
|
||||
if (gfxPrefs::LayersAccelerationForceEnabled()) {
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsIAddonInterposition.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
|
||||
@ -207,7 +208,7 @@ CompartmentPerAddon()
|
||||
|
||||
if (!initialized) {
|
||||
pref = Preferences::GetBool("dom.compartment_per_addon", false) ||
|
||||
Preferences::GetBool("browser.tabs.remote.autostart", false);
|
||||
BrowserTabsRemoteAutostart();
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
|
@ -369,7 +369,7 @@ addMessageListener("UpdateCharacterSet", function (aMessage) {
|
||||
// The AddonsChild needs to be rooted so that it stays alive as long as
|
||||
// the tab.
|
||||
let AddonsChild;
|
||||
if (Services.prefs.getBoolPref("browser.tabs.remote.autostart")) {
|
||||
if (Services.appinfo.browserTabsRemoteAutostart) {
|
||||
// Currently, the addon shims are only supported when autostarting
|
||||
// with remote tabs.
|
||||
AddonsChild = RemoteAddonsChild.init(this);
|
||||
|
@ -4150,7 +4150,7 @@ this.XPIProvider = {
|
||||
let principal = Cc["@mozilla.org/systemprincipal;1"].
|
||||
createInstance(Ci.nsIPrincipal);
|
||||
|
||||
if (!aMultiprocessCompatible && Prefs.getBoolPref("browser.tabs.remote.autostart", false)) {
|
||||
if (!aMultiprocessCompatible && Services.appinfo.browserTabsRemoteAutostart) {
|
||||
let interposition = Cc["@mozilla.org/addons/multiprocess-shims;1"].
|
||||
getService(Ci.nsIAddonInterposition);
|
||||
Cu.setAddonInterposition(aId, interposition);
|
||||
|
@ -818,6 +818,16 @@ nsXULAppInfo::GetBrowserTabsRemote(bool* aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static bool gBrowserTabsRemoteAutostart = false;
|
||||
static bool gBrowserTabsRemoteAutostartInitialized = false;
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULAppInfo::GetBrowserTabsRemoteAutostart(bool* aResult)
|
||||
{
|
||||
*aResult = BrowserTabsRemoteAutostart();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULAppInfo::EnsureContentProcess()
|
||||
{
|
||||
@ -4510,6 +4520,18 @@ mozilla::BrowserTabsRemote()
|
||||
return gBrowserTabsRemote;
|
||||
}
|
||||
|
||||
bool
|
||||
mozilla::BrowserTabsRemoteAutostart()
|
||||
{
|
||||
if (!gBrowserTabsRemoteAutostartInitialized) {
|
||||
gBrowserTabsRemoteAutostart = !gSafeMode &&
|
||||
Preferences::GetBool("browser.tabs.remote.autostart", false);
|
||||
gBrowserTabsRemoteAutostartInitialized = true;
|
||||
}
|
||||
|
||||
return gBrowserTabsRemoteAutostart;
|
||||
}
|
||||
|
||||
void
|
||||
SetupErrorHandling(const char* progname)
|
||||
{
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsIToolkitChromeRegistry.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsDirectoryServiceDefs.h"
|
||||
@ -543,7 +544,7 @@ nsXREDirProvider::GetFiles(const char* aProperty, nsISimpleEnumerator** aResult)
|
||||
static void
|
||||
RegisterExtensionInterpositions(nsINIParser &parser)
|
||||
{
|
||||
if (!mozilla::Preferences::GetBool("browser.tabs.remote.autostart", false))
|
||||
if (!mozilla::BrowserTabsRemoteAutostart())
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIAddonInterposition> interposition =
|
||||
|
@ -9,6 +9,11 @@
|
||||
namespace mozilla {
|
||||
// Simple C++ getter for nsIXULRuntime::browserTabsRemote
|
||||
bool BrowserTabsRemote();
|
||||
// Simple C++ getter for nsIXULRuntime::browserTabsRemoteAutostart
|
||||
// This getter is a temporary function that checks for special
|
||||
// conditions in which e10s support is not great yet, and should
|
||||
// therefore be disabled. Bug 1065561 tracks its removal.
|
||||
bool BrowserTabsRemoteAutostart();
|
||||
}
|
||||
|
||||
%}
|
||||
@ -20,7 +25,7 @@ bool BrowserTabsRemote();
|
||||
* stable/frozen, please contact Benjamin Smedberg.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e080b1f6-8452-4bde-9368-c795808b86d1)]
|
||||
[scriptable, uuid(e652d3b8-c77c-4601-a84d-b0716d2b32c0)]
|
||||
interface nsIXULRuntime : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -88,6 +93,12 @@ interface nsIXULRuntime : nsISupports
|
||||
*/
|
||||
readonly attribute boolean browserTabsRemote;
|
||||
|
||||
/**
|
||||
* If true, browser tabs may be opened by default in a different process
|
||||
* from the main browser UI.
|
||||
*/
|
||||
readonly attribute boolean browserTabsRemoteAutostart;
|
||||
|
||||
/**
|
||||
* Signal the apprunner to invalidate caches on the next restart.
|
||||
* This will cause components to be autoregistered and all
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIXPConnect.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
|
||||
#include "nsIWindowMediator.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
@ -607,8 +608,7 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent,
|
||||
// Enforce the Private Browsing autoStart pref first.
|
||||
bool isPrivateBrowsingWindow =
|
||||
Preferences::GetBool("browser.privatebrowsing.autostart");
|
||||
bool isUsingRemoteTabs =
|
||||
Preferences::GetBool("browser.tabs.remote.autostart");
|
||||
bool isUsingRemoteTabs = mozilla::BrowserTabsRemoteAutostart();
|
||||
|
||||
if (aChromeMask & nsIWebBrowserChrome::CHROME_PRIVATE_WINDOW) {
|
||||
// Caller requested a private window
|
||||
|
Loading…
Reference in New Issue
Block a user