Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1456995] enable Service Workers' parent-intercept mode on Nightly #19521

merged 1 commit into from Oct 9, 2019
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

@@ -153,18 +153,35 @@ def env_options():

def run_info_extras(**kwargs):

def get_bool_pref(pref):
def get_bool_pref_if_exists(pref):
for key, value in kwargs.get('extra_prefs', []):
if pref == key:
return value.lower() in ('true', '1')
return False
return None

def get_bool_pref(pref):
pref_value = get_bool_pref_if_exists(pref)
return pref_value if pref_value is not None else False

rv = {"e10s": kwargs["gecko_e10s"],
"wasm": kwargs.get("wasm", True),
"verify": kwargs["verify"],
"headless": kwargs.get("headless", False) or "MOZ_HEADLESS" in os.environ,
"fission": get_bool_pref("fission.autostart"),
"sw-e10s": get_bool_pref("dom.serviceWorkers.parent_intercept")}
"fission": get_bool_pref("fission.autostart")}

# The value of `sw-e10s` defaults to whether the "parent_intercept"
# implementation is enabled for the current build. This value, however,
# can be overridden by explicitly setting the pref with the `--setpref` CLI
# flag, which is checked here. If not supplied, the default value of
# `sw-e10s` will be filled in in `RunInfo`'s constructor.
# We can't capture the default value right now because (currently), it
# defaults to the value of `nightly_build`, which isn't known until
# `RunInfo`'s constructor.
sw_e10s_override = get_bool_pref_if_exists("dom.serviceWorkers.parent_intercept")
if sw_e10s_override is not None:
rv["sw-e10s"] = sw_e10s_override

return rv

@@ -67,8 +67,7 @@ def env_extras(**kwargs):
def run_info_extras(**kwargs):
package = kwargs["package_name"]
rv = {"e10s": True if package is not None and "geckoview" in package else False,
"headless": False,
"sw-e10s": False}
"headless": False}
return rv

@@ -112,6 +112,18 @@ def __init__(self, metadata_root, product, debug,
if extras is not None:

# Until the test harness can understand default pref values,
# ( this value
# should by synchronized with the default pref value indicated in
# StaticPrefList.yaml.
# Currently for automation, the pref (and `sw-e10s`) defaults to true in
# nightly builds and false otherwise but can be overridden with
# `--setpref`. If overridden, the value would be initialized in
# `run_info_extras` and be supplied in the `extras` parameter.
if "sw-e10s" not in self:
self["sw-e10s"] = self.get("nightly_build", False)

self["headless"] = extras.get("headless", False)
self["webrender"] = enable_webrender

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.