Bug 1603190 - Enable windowless-service-workers in Nightly r=jlast,Honza

Differential Revision: https://phabricator.services.mozilla.com/D59481
This commit is contained in:
Brian Hackett 2020-04-23 15:09:56 +00:00
parent a41eba98d9
commit 9642a11373
3 changed files with 10 additions and 4 deletions

View File

@ -151,14 +151,15 @@ async function listProcessTargets(args: Args): Promise<*> {
if (currentTarget.url && features.windowlessServiceWorkers) {
// Service workers associated with our target's origin need to pause until
// we attach, regardless of which process they are running in.
const origin = new URL(currentTarget.url).origin;
const targets = await getAllProcessTargets(args);
try {
const origin = new URL(currentTarget.url).origin;
const targets = await getAllProcessTargets(args);
await Promise.all(
targets.map(t => t.pauseMatchingServiceWorkers({ origin }))
);
} catch (e) {
// Old servers without pauseMatchingServiceWorkers will throw.
// currentTarget.url might not be a full URL, and old servers without
// pauseMatchingServiceWorkers will throw.
// @backward-compatibility: remove in Firefox 75
}
}

View File

@ -86,4 +86,3 @@ pref("devtools.debugger.features.log-points", true);
pref("devtools.debugger.features.overlay", true);
pref("devtools.debugger.features.inline-preview", true);
pref("devtools.debugger.features.frame-step", true);
pref("devtools.debugger.features.windowless-service-workers", false);

View File

@ -4892,6 +4892,12 @@ pref("devtools.errorconsole.deprecation_warnings", true);
pref("devtools.debugger.features.watchpoints", true);
#ifdef NIGHTLY_BUILD
pref("devtools.debugger.features.windowless-service-workers", true);
#else
pref("devtools.debugger.features.windowless-service-workers", false);
#endif
// Disable remote debugging protocol logging.
pref("devtools.debugger.log", false);
pref("devtools.debugger.log.verbose", false);