Skip to content

Commit

Permalink
Bug 1724089 - Remove browser.tabs.remote.autostart pref r=webdriver-r…
Browse files Browse the repository at this point in the history
…eviewers,perftest-reviewers,geckoview-reviewers,jgraham,extension-reviewers,mossop,sparky,robwu,owlish

Differential Revision: https://phabricator.services.mozilla.com/D192136
  • Loading branch information
gregorypappas committed Jan 2, 2024
1 parent b9e458f commit bf28beb
Show file tree
Hide file tree
Showing 22 changed files with 39 additions and 118 deletions.
3 changes: 0 additions & 3 deletions browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2166,9 +2166,6 @@ 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);

Expand Down
6 changes: 0 additions & 6 deletions build/pgo/profileserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ def get_crashreports(directory, name=None):
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ 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);

Expand Down
12 changes: 4 additions & 8 deletions layout/tools/reftest/runreftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,11 +471,6 @@ def createReftestProfile(
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:
Expand Down Expand Up @@ -529,9 +524,7 @@ def createReftestProfile(

self.copyExtraFilesToProfile(options, profile)

self.log.info(
"Running with e10s: {}".format(prefs["browser.tabs.remote.autostart"])
)
self.log.info("Running with e10s: {}".format(options.e10s))
self.log.info("Running with fission: {}".format(prefs["fission.autostart"]))

return profile
Expand Down Expand Up @@ -577,6 +570,9 @@ def buildBrowserEnv(self, options, profileDir):
if options.headless:
browserEnv["MOZ_HEADLESS"] = "1"

if not options.e10s:
browserEnv["MOZ_FORCE_DISABLE_E10S"] = "1"

return browserEnv

def cleanup(self, profileDir):
Expand Down
2 changes: 0 additions & 2 deletions mobile/android/app/geckoview-prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ 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);
Expand Down
3 changes: 0 additions & 3 deletions modules/libpref/init/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -2025,9 +2025,6 @@ 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);
Expand Down
2 changes: 0 additions & 2 deletions testing/marionette/client/marionette_driver/geckoinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,6 @@ 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__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ def test_desktop_instance_preferences(self):
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,
Expand Down
4 changes: 3 additions & 1 deletion testing/mochitest/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2016,6 +2016,9 @@ def buildBrowserEnv(self, options, debugger=False, env=None):
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")

Expand Down Expand Up @@ -2474,7 +2477,6 @@ def buildProfile(self, options):

# 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",
Expand Down
5 changes: 1 addition & 4 deletions testing/mochitest/tests/python/test_build_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ def profile_data_dir():


def test_common_prefs_are_all_set(build_profile, profile_data_dir):
# 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)
md, result = build_profile()

with open(os.path.join(profile_data_dir, "profiles.json"), "r") as fh:
base_profiles = json.load(fh)["mochitest"]
Expand Down
3 changes: 0 additions & 3 deletions testing/profiles/geckoview-junit/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@
// Base preferences file used by the mochitest
/* globals user_pref */
/* eslint quotes: 0 */

// Always run in e10s
user_pref("browser.tabs.remote.autostart", true);
1 change: 0 additions & 1 deletion testing/profiles/perf/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ 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);
Expand Down
5 changes: 2 additions & 3 deletions testing/profiles/unittest-required/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ 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);
// Don't use auto-enabled e10s
user_pref("browser.tabs.remote.autostart", false);
user_pref("browser.ui.layout.tablet", 0); // force tablet UI off
// force tablet UI off
user_pref("browser.ui.layout.tablet", 0);
// 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");
Expand Down
3 changes: 0 additions & 3 deletions testing/raptor/raptor/browsertime/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ def build_browser_profile(self):
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
Expand Down
3 changes: 0 additions & 3 deletions testing/raptor/raptor/perftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,9 +726,6 @@ def build_browser_profile(self):
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"])
Expand Down
4 changes: 2 additions & 2 deletions testing/testsuite-targets.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ REMOTE_REFTEST = rm -f ./[email protected] && $(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=browser.tabs.remote.autostart=true --setpref=layers.acceleration.disabled=true
OOP_CONTENT = --setpref=layers.async-pan-zoom.enabled=true --setpref=layers.acceleration.disabled=true
GPU_RENDERING =
else
OOP_CONTENT = --setpref=layers.async-pan-zoom.enabled=true --setpref=browser.tabs.remote.autostart=true
OOP_CONTENT = --setpref=layers.async-pan-zoom.enabled=true
GPU_RENDERING = --setpref=layers.acceleration.force-enabled=true
endif #}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
def get_environ(logger, binary, debug_info, headless, chaos_mode_flags=None, e10s=True):
# 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:
Expand All @@ -286,6 +286,8 @@ def get_environ(logger, binary, debug_info, headless, chaos_mode_flags=None):
env["MOZ_CHAOSMODE"] = hex(chaos_mode_flags)
if headless:
env["MOZ_HEADLESS"] = "1"
if not e10s:
env["MOZ_FORCE_DISABLE_E10S"] = "1"
return env


Expand All @@ -309,7 +311,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):
leak_check, stackfix_dir, symbols_path, asan, e10s):
"""Object that manages starting and stopping instances of Firefox."""
self.logger = logger
self.binary = binary
Expand All @@ -322,6 +324,7 @@ def __init__(self, logger, binary, binary_args, profile_creator, debug_info,
self.stackfix_dir = stackfix_dir
self.symbols_path = symbols_path
self.asan = asan
self.e10s = e10s

self.previous = None
self.current = None
Expand Down Expand Up @@ -358,7 +361,7 @@ def start(self):
profile.set_preferences({"marionette.port": marionette_port})

env = get_environ(self.logger, self.binary, self.debug_info,
self.headless, self.chaos_mode_flags)
self.headless, self.chaos_mode_flags, self.e10s)

args = self.binary_args[:] if self.binary_args else []
args += [cmd_arg("marionette"), "about:blank"]
Expand Down Expand Up @@ -639,15 +642,14 @@ def __call__(self, line):


class ProfileCreator:
def __init__(self, logger, prefs_root, config, test_type, extra_prefs, e10s,
def __init__(self, logger, prefs_root, config, test_type, extra_prefs,
disable_fission, debug_test, browser_channel, binary, certutil_binary,
ca_certificate_path):
self.logger = logger
self.prefs_root = prefs_root
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
Expand Down Expand Up @@ -713,8 +715,6 @@ def _set_required_prefs(self, profile):
"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:
Expand All @@ -726,11 +726,6 @@ def _set_required_prefs(self, profile):
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})

Expand Down Expand Up @@ -820,7 +815,6 @@ def __init__(self, logger, binary, prefs_root, test_type, extra_prefs=None, debu
config,
test_type,
extra_prefs,
e10s,
disable_fission,
debug_test,
browser_channel,
Expand All @@ -842,7 +836,8 @@ def __init__(self, logger, binary, prefs_root, test_type, extra_prefs=None, debu
leak_check,
stackfix_dir,
symbols_path,
asan)
asan,
e10s)

def settings(self, test):
self._settings = {"check_leaks": self.leak_check and not test.leaks,
Expand Down Expand Up @@ -910,14 +905,13 @@ def __init__(self, logger, binary, prefs_root, webdriver_binary, webdriver_args,
self.leak_check = leak_check
self.leak_report_file = None

self.env = self.get_env(binary, debug_info, headless, chaos_mode_flags)
self.env = self.get_env(binary, debug_info, headless, chaos_mode_flags, e10s)

profile_creator = ProfileCreator(logger,
prefs_root,
config,
"wdspec",
extra_prefs,
e10s,
disable_fission,
debug_test,
browser_channel,
Expand All @@ -928,12 +922,12 @@ def __init__(self, logger, binary, prefs_root, webdriver_binary, webdriver_args,
self.profile = profile_creator.create()
self.marionette_port = None

def get_env(self, binary, debug_info, headless, chaos_mode_flags):
def get_env(self, binary, debug_info, headless, chaos_mode_flags, e10s):
env = get_environ(self.logger,
binary,
debug_info,
headless,
chaos_mode_flags)
chaos_mode_flags, e10s)
env["RUST_BACKTRACE"] = "1"
return env

Expand Down
Loading

0 comments on commit bf28beb

Please sign in to comment.