зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 88de278b4ca9 (bug 1724089) for causing xpcshell failures.
This commit is contained in:
Родитель
5a2f7b26e2
Коммит
9fe9443876
|
@ -2166,6 +2166,9 @@ pref("privacy.fingerprintingProtection.pbmode", true);
|
|||
pref("privacy.exposeContentTitleInWindow", true);
|
||||
pref("privacy.exposeContentTitleInWindow.pbm", true);
|
||||
|
||||
// Start the browser in e10s mode
|
||||
pref("browser.tabs.remote.autostart", true);
|
||||
|
||||
// Run media transport in a separate process?
|
||||
pref("media.peerconnection.mtransport_process", true);
|
||||
|
||||
|
|
|
@ -124,6 +124,12 @@ if __name__ == "__main__":
|
|||
v = v.format(**interpolation)
|
||||
prefs[k] = Preferences.cast(v)
|
||||
|
||||
# Enforce e10s. This isn't in one of the user.js files because those
|
||||
# are shared with android, which doesn't want this on. We can't
|
||||
# interpolate because the formatting code only works for strings,
|
||||
# and this is a bool pref.
|
||||
prefs["browser.tabs.remote.autostart"] = True
|
||||
|
||||
profile = FirefoxProfile(
|
||||
profile=profilePath,
|
||||
preferences=prefs,
|
||||
|
|
|
@ -28,6 +28,12 @@ server.registerPathHandler("/sw.js", (request, response) => {
|
|||
});
|
||||
|
||||
add_task(async function setup_prefs() {
|
||||
equal(
|
||||
Services.prefs.getBoolPref("browser.tabs.remote.autostart"),
|
||||
true,
|
||||
"e10s is expected to be enabled"
|
||||
);
|
||||
|
||||
// Enable nsIServiceWorkerManager.registerForTest.
|
||||
Services.prefs.setBoolPref("dom.serviceWorkers.testing.enabled", true);
|
||||
|
||||
|
|
|
@ -471,6 +471,11 @@ class RefTest(object):
|
|||
elif manifests:
|
||||
prefs["reftest.manifests"] = json.dumps(manifests)
|
||||
|
||||
# Unconditionally update the e10s pref, default True
|
||||
prefs["browser.tabs.remote.autostart"] = True
|
||||
if not options.e10s:
|
||||
prefs["browser.tabs.remote.autostart"] = False
|
||||
|
||||
# default fission to True
|
||||
prefs["fission.autostart"] = True
|
||||
if options.disableFission:
|
||||
|
@ -524,7 +529,9 @@ class RefTest(object):
|
|||
|
||||
self.copyExtraFilesToProfile(options, profile)
|
||||
|
||||
self.log.info("Running with e10s: {}".format(options.e10s))
|
||||
self.log.info(
|
||||
"Running with e10s: {}".format(prefs["browser.tabs.remote.autostart"])
|
||||
)
|
||||
self.log.info("Running with fission: {}".format(prefs["fission.autostart"]))
|
||||
|
||||
return profile
|
||||
|
@ -570,9 +577,6 @@ class RefTest(object):
|
|||
if options.headless:
|
||||
browserEnv["MOZ_HEADLESS"] = "1"
|
||||
|
||||
if not options.e10s:
|
||||
browserEnv["MOZ_FORCE_DISABLE_E10S"] = "1"
|
||||
|
||||
return browserEnv
|
||||
|
||||
def cleanup(self, profileDir):
|
||||
|
|
|
@ -142,6 +142,8 @@ pref("browser.sessionstore.max_tabs_undo", 10);
|
|||
pref("browser.sessionstore.privacy_level", 0);
|
||||
pref("browser.sessionstore.resume_from_crash", true);
|
||||
|
||||
pref("browser.tabs.remote.autostart", true);
|
||||
|
||||
// Bug 1809922 to enable translations
|
||||
#ifdef NIGHTLY_BUILD
|
||||
pref("browser.translations.enable", true);
|
||||
|
|
|
@ -2025,6 +2025,9 @@ pref("dom.ipc.keepProcessesAlive.privilegedabout", 1);
|
|||
// Disable support for SVG
|
||||
pref("svg.disabled", false);
|
||||
|
||||
// Disable e10s for Gecko by default. This is overridden in firefox.js.
|
||||
pref("browser.tabs.remote.autostart", false);
|
||||
|
||||
// This pref will cause assertions when a remoteType triggers a process switch
|
||||
// to a new remoteType it should not be able to trigger.
|
||||
pref("browser.tabs.remote.enforceRemoteTypeRestrictions", false);
|
||||
|
|
|
@ -439,6 +439,8 @@ class FennecInstance(GeckoInstance):
|
|||
"browser.safebrowsing.update.enabled": False,
|
||||
# Do not restore the last open set of tabs if the browser has crashed
|
||||
"browser.sessionstore.resume_from_crash": False,
|
||||
# Disable e10s by default
|
||||
"browser.tabs.remote.autostart": False,
|
||||
}
|
||||
|
||||
def __init__(
|
||||
|
|
|
@ -40,6 +40,9 @@ class TestPreferences(MarionetteTestCase):
|
|||
required_prefs = geckoinstance.DesktopInstance.desktop_prefs
|
||||
|
||||
for key, value in six.iteritems(required_prefs):
|
||||
if key in ["browser.tabs.remote.autostart"]:
|
||||
return
|
||||
|
||||
self.assertEqual(
|
||||
self.marionette.get_pref(key),
|
||||
value,
|
||||
|
|
|
@ -2016,9 +2016,6 @@ toolbar#nav-bar {
|
|||
if options.headless:
|
||||
browserEnv["MOZ_HEADLESS"] = "1"
|
||||
|
||||
if not options.e10s:
|
||||
browserEnv["MOZ_FORCE_DISABLE_E10S"] = "1"
|
||||
|
||||
if options.dmd:
|
||||
browserEnv["DMD"] = os.environ.get("DMD", "1")
|
||||
|
||||
|
@ -2477,6 +2474,7 @@ toolbar#nav-bar {
|
|||
|
||||
# Hardcoded prefs (TODO move these into a base profile)
|
||||
prefs = {
|
||||
"browser.tabs.remote.autostart": options.e10s,
|
||||
# Enable tracing output for detailed failures in case of
|
||||
# failing connection attempts, and hangs (bug 1397201)
|
||||
"remote.log.level": "Trace",
|
||||
|
|
|
@ -43,7 +43,10 @@ def profile_data_dir():
|
|||
|
||||
|
||||
def test_common_prefs_are_all_set(build_profile, profile_data_dir):
|
||||
md, result = build_profile()
|
||||
# We set e10s=False here because MochitestDesktop.buildProfile overwrites
|
||||
# the value defined in the base profile.
|
||||
# TODO stop setting browser.tabs.remote.autostart in the base profile
|
||||
md, result = build_profile(e10s=False)
|
||||
|
||||
with open(os.path.join(profile_data_dir, "profiles.json"), "r") as fh:
|
||||
base_profiles = json.load(fh)["mochitest"]
|
||||
|
|
|
@ -5,3 +5,6 @@
|
|||
// Base preferences file used by the mochitest
|
||||
/* globals user_pref */
|
||||
/* eslint quotes: 0 */
|
||||
|
||||
// Always run in e10s
|
||||
user_pref("browser.tabs.remote.autostart", true);
|
||||
|
|
|
@ -33,6 +33,7 @@ user_pref("browser.safebrowsing.provider.mozilla.gethashURL", "http://127.0.0.1/
|
|||
user_pref("browser.safebrowsing.provider.mozilla.updateURL", "http://127.0.0.1/safebrowsing-dummy/update");
|
||||
user_pref("browser.shell.checkDefaultBrowser", false);
|
||||
user_pref("browser.startup.couldRestoreSession.count", -1);
|
||||
user_pref("browser.tabs.remote.autostart", true);
|
||||
user_pref("browser.warnOnQuit", false);
|
||||
user_pref("datareporting.healthreport.documentServerURI", "http://127.0.0.1/healthreport/");
|
||||
user_pref("devtools.chrome.enabled", false);
|
||||
|
|
|
@ -49,8 +49,9 @@ user_pref("browser.shell.checkDefaultBrowser", false);
|
|||
user_pref("browser.startup.page", 0); // use about:blank, not browser.startup.homepage
|
||||
// Don't show a delay when hiding the audio indicator during tests
|
||||
user_pref("browser.tabs.delayHidingAudioPlayingIconMS", 0);
|
||||
// force tablet UI off
|
||||
user_pref("browser.ui.layout.tablet", 0);
|
||||
// Don't use auto-enabled e10s
|
||||
user_pref("browser.tabs.remote.autostart", false);
|
||||
user_pref("browser.ui.layout.tablet", 0); // force tablet UI off
|
||||
// Ensure UITour won't hit the network
|
||||
user_pref("browser.uitour.pinnedTabUrl", "http://{server}/uitour-dummy/pinnedTab");
|
||||
user_pref("browser.uitour.url", "http://{server}/uitour-dummy/tour");
|
||||
|
|
|
@ -190,6 +190,9 @@ class BrowsertimeAndroid(PerftestAndroid, Browsertime):
|
|||
path = os.path.join(self.profile_data_dir, "raptor-android")
|
||||
LOG.info("Merging profile: {}".format(path))
|
||||
self.profile.merge(path)
|
||||
self.profile.set_preferences(
|
||||
{"browser.tabs.remote.autostart": self.config["e10s"]}
|
||||
)
|
||||
|
||||
# There's no great way to have "after" advice in Python, so we do this
|
||||
# in super and then again here since the profile merging re-introduces
|
||||
|
|
|
@ -726,6 +726,9 @@ class PerftestAndroid(Perftest):
|
|||
path = os.path.join(self.profile_data_dir, "raptor-android")
|
||||
LOG.info("Merging profile: {}".format(path))
|
||||
self.profile.merge(path)
|
||||
self.profile.set_preferences(
|
||||
{"browser.tabs.remote.autostart": self.config["e10s"]}
|
||||
)
|
||||
|
||||
def clear_app_data(self):
|
||||
LOG.info("clearing %s app data" % self.config["binary"])
|
||||
|
|
|
@ -40,10 +40,10 @@ REMOTE_REFTEST = rm -f ./$@.log && $(PYTHON3) _tests/reftest/remotereftest.py \
|
|||
|
||||
ifeq ($(OS_ARCH),WINNT) #{
|
||||
# GPU-rendered shadow layers are unsupported here
|
||||
OOP_CONTENT = --setpref=layers.async-pan-zoom.enabled=true --setpref=layers.acceleration.disabled=true
|
||||
OOP_CONTENT = --setpref=layers.async-pan-zoom.enabled=true --setpref=browser.tabs.remote.autostart=true --setpref=layers.acceleration.disabled=true
|
||||
GPU_RENDERING =
|
||||
else
|
||||
OOP_CONTENT = --setpref=layers.async-pan-zoom.enabled=true
|
||||
OOP_CONTENT = --setpref=layers.async-pan-zoom.enabled=true --setpref=browser.tabs.remote.autostart=true
|
||||
GPU_RENDERING = --setpref=layers.acceleration.force-enabled=true
|
||||
endif #}
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ def log_gecko_crashes(logger, process, test, profile_dir, symbols_path, stackwal
|
|||
return False
|
||||
|
||||
|
||||
def get_environ(logger, binary, debug_info, headless, chaos_mode_flags=None, e10s=True):
|
||||
def get_environ(logger, binary, debug_info, headless, chaos_mode_flags=None):
|
||||
# Hack: test_environment expects a bin_suffix key in mozinfo that in gecko infrastructure
|
||||
# is set in the build system. Set it manually here.
|
||||
if "bin_suffix" not in mozinfo.info:
|
||||
|
@ -286,8 +286,6 @@ def get_environ(logger, binary, debug_info, headless, chaos_mode_flags=None, e10
|
|||
env["MOZ_CHAOSMODE"] = hex(chaos_mode_flags)
|
||||
if headless:
|
||||
env["MOZ_HEADLESS"] = "1"
|
||||
if not e10s:
|
||||
env["MOZ_FORCE_DISABLE_E10S"] = "1"
|
||||
return env
|
||||
|
||||
|
||||
|
@ -311,7 +309,7 @@ class FirefoxInstanceManager:
|
|||
|
||||
def __init__(self, logger, binary, binary_args, profile_creator, debug_info,
|
||||
chaos_mode_flags, headless,
|
||||
leak_check, stackfix_dir, symbols_path, asan, e10s):
|
||||
leak_check, stackfix_dir, symbols_path, asan):
|
||||
"""Object that manages starting and stopping instances of Firefox."""
|
||||
self.logger = logger
|
||||
self.binary = binary
|
||||
|
@ -324,7 +322,6 @@ class FirefoxInstanceManager:
|
|||
self.stackfix_dir = stackfix_dir
|
||||
self.symbols_path = symbols_path
|
||||
self.asan = asan
|
||||
self.e10s = e10s
|
||||
|
||||
self.previous = None
|
||||
self.current = None
|
||||
|
@ -361,7 +358,7 @@ class FirefoxInstanceManager:
|
|||
profile.set_preferences({"marionette.port": marionette_port})
|
||||
|
||||
env = get_environ(self.logger, self.binary, self.debug_info,
|
||||
self.headless, self.chaos_mode_flags, self.e10s)
|
||||
self.headless, self.chaos_mode_flags)
|
||||
|
||||
args = self.binary_args[:] if self.binary_args else []
|
||||
args += [cmd_arg("marionette"), "about:blank"]
|
||||
|
@ -642,7 +639,7 @@ class GeckodriverOutputHandler(FirefoxOutputHandler):
|
|||
|
||||
|
||||
class ProfileCreator:
|
||||
def __init__(self, logger, prefs_root, config, test_type, extra_prefs,
|
||||
def __init__(self, logger, prefs_root, config, test_type, extra_prefs, e10s,
|
||||
disable_fission, debug_test, browser_channel, binary, certutil_binary,
|
||||
ca_certificate_path):
|
||||
self.logger = logger
|
||||
|
@ -650,6 +647,7 @@ class ProfileCreator:
|
|||
self.config = config
|
||||
self.test_type = test_type
|
||||
self.extra_prefs = extra_prefs
|
||||
self.e10s = e10s
|
||||
self.disable_fission = disable_fission
|
||||
self.debug_test = debug_test
|
||||
self.browser_channel = browser_channel
|
||||
|
@ -715,6 +713,8 @@ class ProfileCreator:
|
|||
"network.proxy.type": 0,
|
||||
"places.history.enabled": False,
|
||||
})
|
||||
if self.e10s:
|
||||
profile.set_preferences({"browser.tabs.remote.autostart": True})
|
||||
|
||||
profile.set_preferences({"fission.autostart": True})
|
||||
if self.disable_fission:
|
||||
|
@ -726,6 +726,11 @@ class ProfileCreator:
|
|||
if self.test_type == "print-reftest":
|
||||
profile.set_preferences({"print.always_print_silent": True})
|
||||
|
||||
# Bug 1262954: winxp + e10s, disable hwaccel
|
||||
if (self.e10s and platform.system() in ("Windows", "Microsoft") and
|
||||
"5.1" in platform.version()):
|
||||
profile.set_preferences({"layers.acceleration.disabled": True})
|
||||
|
||||
if self.debug_test:
|
||||
profile.set_preferences({"devtools.console.stdout.content": True})
|
||||
|
||||
|
@ -815,6 +820,7 @@ class FirefoxBrowser(Browser):
|
|||
config,
|
||||
test_type,
|
||||
extra_prefs,
|
||||
e10s,
|
||||
disable_fission,
|
||||
debug_test,
|
||||
browser_channel,
|
||||
|
@ -836,8 +842,7 @@ class FirefoxBrowser(Browser):
|
|||
leak_check,
|
||||
stackfix_dir,
|
||||
symbols_path,
|
||||
asan,
|
||||
e10s)
|
||||
asan)
|
||||
|
||||
def settings(self, test):
|
||||
self._settings = {"check_leaks": self.leak_check and not test.leaks,
|
||||
|
@ -905,13 +910,14 @@ class FirefoxWdSpecBrowser(WebDriverBrowser):
|
|||
self.leak_check = leak_check
|
||||
self.leak_report_file = None
|
||||
|
||||
self.env = self.get_env(binary, debug_info, headless, chaos_mode_flags, e10s)
|
||||
self.env = self.get_env(binary, debug_info, headless, chaos_mode_flags)
|
||||
|
||||
profile_creator = ProfileCreator(logger,
|
||||
prefs_root,
|
||||
config,
|
||||
"wdspec",
|
||||
extra_prefs,
|
||||
e10s,
|
||||
disable_fission,
|
||||
debug_test,
|
||||
browser_channel,
|
||||
|
@ -922,12 +928,12 @@ class FirefoxWdSpecBrowser(WebDriverBrowser):
|
|||
self.profile = profile_creator.create()
|
||||
self.marionette_port = None
|
||||
|
||||
def get_env(self, binary, debug_info, headless, chaos_mode_flags, e10s):
|
||||
def get_env(self, binary, debug_info, headless, chaos_mode_flags):
|
||||
env = get_environ(self.logger,
|
||||
binary,
|
||||
debug_info,
|
||||
headless,
|
||||
chaos_mode_flags, e10s)
|
||||
chaos_mode_flags)
|
||||
env["RUST_BACKTRACE"] = "1"
|
||||
return env
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ def browser_kwargs(logger, test_type, run_info_data, config, **kwargs):
|
|||
"timeout_multiplier": get_timeout_multiplier(test_type,
|
||||
run_info_data,
|
||||
**kwargs),
|
||||
"e10s": run_info_data["e10s"],
|
||||
"disable_fission": kwargs["disable_fission"],
|
||||
# desktop only
|
||||
"leak_check": False,
|
||||
|
@ -92,7 +93,8 @@ def env_extras(**kwargs):
|
|||
def run_info_extras(logger, **kwargs):
|
||||
rv = fx_run_info_extras(logger, **kwargs)
|
||||
package = kwargs["package_name"]
|
||||
rv.update({"headless": False})
|
||||
rv.update({"e10s": True if package is not None and "geckoview" in package else False,
|
||||
"headless": False})
|
||||
|
||||
if kwargs["browser_version"] is None:
|
||||
rv.update(run_info_browser_version(**kwargs))
|
||||
|
@ -148,7 +150,7 @@ class ProfileCreator(FirefoxProfileCreator):
|
|||
def __init__(self, logger, prefs_root, config, test_type, extra_prefs,
|
||||
disable_fission, debug_test, browser_channel, certutil_binary, ca_certificate_path):
|
||||
super().__init__(logger, prefs_root, config, test_type, extra_prefs,
|
||||
disable_fission, debug_test, browser_channel, None,
|
||||
True, disable_fission, debug_test, browser_channel, None,
|
||||
certutil_binary, ca_certificate_path)
|
||||
|
||||
def _set_required_prefs(self, profile):
|
||||
|
@ -157,6 +159,7 @@ class ProfileCreator(FirefoxProfileCreator):
|
|||
"dom.disable_open_during_load": False,
|
||||
"places.history.enabled": False,
|
||||
"dom.send_after_paint_to_content": True,
|
||||
"browser.tabs.remote.autostart": True,
|
||||
})
|
||||
|
||||
if self.test_type == "reftest":
|
||||
|
@ -185,7 +188,7 @@ class FirefoxAndroidBrowser(Browser):
|
|||
def __init__(self, logger, prefs_root, test_type, package_name="org.mozilla.geckoview.test_runner",
|
||||
device_serial=None, extra_prefs=None, debug_info=None,
|
||||
symbols_path=None, stackwalk_binary=None, certutil_binary=None,
|
||||
ca_certificate_path=None, stackfix_dir=None,
|
||||
ca_certificate_path=None, e10s=False, stackfix_dir=None,
|
||||
binary_args=None, timeout_multiplier=None, leak_check=False, asan=False,
|
||||
chaos_mode_flags=None, config=None, browser_channel="nightly",
|
||||
install_fonts=False, tests_root=None, specialpowers_path=None, adb_binary=None,
|
||||
|
@ -201,6 +204,7 @@ class FirefoxAndroidBrowser(Browser):
|
|||
self.stackwalk_binary = stackwalk_binary
|
||||
self.certutil_binary = certutil_binary
|
||||
self.ca_certificate_path = ca_certificate_path
|
||||
self.e10s = True
|
||||
self.stackfix_dir = stackfix_dir
|
||||
self.binary_args = binary_args
|
||||
self.timeout_multiplier = timeout_multiplier
|
||||
|
@ -344,7 +348,7 @@ class FirefoxAndroidBrowser(Browser):
|
|||
class FirefoxAndroidWdSpecBrowser(FirefoxWdSpecBrowser):
|
||||
def __init__(self, logger, prefs_root, webdriver_binary, webdriver_args,
|
||||
extra_prefs=None, debug_info=None, symbols_path=None, stackwalk_binary=None,
|
||||
certutil_binary=None, ca_certificate_path=None,
|
||||
certutil_binary=None, ca_certificate_path=None, e10s=False,
|
||||
disable_fission=False, stackfix_dir=None, leak_check=False,
|
||||
asan=False, chaos_mode_flags=None, config=None,
|
||||
browser_channel="nightly", headless=None,
|
||||
|
@ -354,7 +358,7 @@ class FirefoxAndroidWdSpecBrowser(FirefoxWdSpecBrowser):
|
|||
super().__init__(logger, None, prefs_root, webdriver_binary, webdriver_args,
|
||||
extra_prefs=extra_prefs, debug_info=debug_info, symbols_path=symbols_path,
|
||||
stackwalk_binary=stackwalk_binary, certutil_binary=certutil_binary,
|
||||
ca_certificate_path=ca_certificate_path,
|
||||
ca_certificate_path=ca_certificate_path, e10s=e10s,
|
||||
disable_fission=disable_fission, stackfix_dir=stackfix_dir,
|
||||
leak_check=leak_check, asan=asan,
|
||||
chaos_mode_flags=chaos_mode_flags, config=config,
|
||||
|
@ -382,7 +386,7 @@ class FirefoxAndroidWdSpecBrowser(FirefoxWdSpecBrowser):
|
|||
self.logger.warning("Failed to remove forwarded or reversed ports: %s" % e)
|
||||
super().stop(force=force)
|
||||
|
||||
def get_env(self, binary, debug_info, headless, chaos_mode_flags, e10s):
|
||||
def get_env(self, binary, debug_info, headless, chaos_mode_flags):
|
||||
env = get_environ(chaos_mode_flags)
|
||||
env["RUST_BACKTRACE"] = "1"
|
||||
return env
|
||||
|
|
|
@ -56,6 +56,7 @@ Services.prefs.setBoolPref("dom.security.https_first", false);
|
|||
|
||||
// These values may be changed in later head files and tested in check_remote
|
||||
// below.
|
||||
Services.prefs.setBoolPref("browser.tabs.remote.autostart", false);
|
||||
Services.prefs.setBoolPref("extensions.webextensions.remote", false);
|
||||
const testEnv = {
|
||||
expectRemote: false,
|
||||
|
|
|
@ -2,4 +2,7 @@
|
|||
|
||||
/* globals ExtensionTestUtils */
|
||||
|
||||
// TODO: Remove head_e10s.js and remoteContentScripts (XPCShellContentUtils.sys.mjs)
|
||||
// xpcshell disables e10s by default. Turn it on.
|
||||
Services.prefs.setBoolPref("browser.tabs.remote.autostart", true);
|
||||
|
||||
ExtensionTestUtils.remoteContentScripts = true;
|
||||
|
|
|
@ -533,6 +533,7 @@ bool gFxREmbedded = false;
|
|||
|
||||
enum E10sStatus {
|
||||
kE10sEnabledByDefault,
|
||||
kE10sDisabledByUser,
|
||||
kE10sForceDisabled,
|
||||
};
|
||||
|
||||
|
@ -554,18 +555,43 @@ bool BrowserTabsRemoteAutostart() {
|
|||
return gBrowserTabsRemoteAutostart;
|
||||
}
|
||||
|
||||
gBrowserTabsRemoteAutostart = true;
|
||||
E10sStatus status = kE10sEnabledByDefault;
|
||||
#if defined(MOZILLA_OFFICIAL) && MOZ_BUILD_APP_IS_BROWSER
|
||||
bool allowSingleProcessOutsideAutomation = false;
|
||||
#else
|
||||
bool allowSingleProcessOutsideAutomation = true;
|
||||
#endif
|
||||
|
||||
E10sStatus status = kE10sEnabledByDefault;
|
||||
// We use "are non-local connections disabled" as a proxy for
|
||||
// "are we running some kind of automated test". It would be nicer to use
|
||||
// xpc::IsInAutomation(), but that depends on some prefs being set, which
|
||||
// they are not in (at least) gtests (where we can't) and xpcshell.
|
||||
// Long-term, hopefully we can make all tests e10s-friendly,
|
||||
// then we could remove this automation-only env variable.
|
||||
if (gBrowserTabsRemoteAutostart && xpc::AreNonLocalConnectionsDisabled()) {
|
||||
// Long-term, hopefully we can make tests switch to environment variables
|
||||
// to disable e10s and then we can get rid of this.
|
||||
if (allowSingleProcessOutsideAutomation ||
|
||||
xpc::AreNonLocalConnectionsDisabled()) {
|
||||
bool optInPref =
|
||||
Preferences::GetBool("browser.tabs.remote.autostart", true);
|
||||
|
||||
if (optInPref) {
|
||||
gBrowserTabsRemoteAutostart = true;
|
||||
} else {
|
||||
status = kE10sDisabledByUser;
|
||||
}
|
||||
} else {
|
||||
gBrowserTabsRemoteAutostart = true;
|
||||
}
|
||||
|
||||
// Uber override pref for emergency blocking
|
||||
if (gBrowserTabsRemoteAutostart) {
|
||||
const char* forceDisable = PR_GetEnv("MOZ_FORCE_DISABLE_E10S");
|
||||
if (forceDisable && *forceDisable == '1') {
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
// We need this for xpcshell on Android
|
||||
if (forceDisable && *forceDisable) {
|
||||
#else
|
||||
// The environment variable must match the application version to apply.
|
||||
if (forceDisable && gAppData && !strcmp(forceDisable, gAppData->version)) {
|
||||
#endif
|
||||
gBrowserTabsRemoteAutostart = false;
|
||||
status = kE10sForceDisabled;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче