зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1425897 - Fix race condition in about:debugging test helper;r=baku
MozReview-Commit-ID: ELvxWzld9Um --HG-- extra : rebase_source : b83e790b6e559374be302b6654b39ac1d8ab5271
This commit is contained in:
Родитель
30d3307a79
Коммит
fa4273ed80
|
@ -401,19 +401,22 @@ function* waitForServiceWorkerActivation(swUrl, document) {
|
|||
/**
|
||||
* Set all preferences needed to enable service worker debugging and testing.
|
||||
*/
|
||||
function enableServiceWorkerDebugging() {
|
||||
return new Promise(done => {
|
||||
let options = { "set": [
|
||||
// Enable service workers.
|
||||
["dom.serviceWorkers.enabled", true],
|
||||
// Accept workers from mochitest's http.
|
||||
["dom.serviceWorkers.testing.enabled", true],
|
||||
// Force single content process.
|
||||
["dom.ipc.processCount", 1],
|
||||
]};
|
||||
function* enableServiceWorkerDebugging() {
|
||||
let options = { "set": [
|
||||
// Enable service workers.
|
||||
["dom.serviceWorkers.enabled", true],
|
||||
// Accept workers from mochitest's http.
|
||||
["dom.serviceWorkers.testing.enabled", true],
|
||||
// Force single content process.
|
||||
["dom.ipc.processCount", 1],
|
||||
]};
|
||||
|
||||
// Wait for dom.ipc.processCount to be updated before releasing processes.
|
||||
yield new Promise(done => {
|
||||
SpecialPowers.pushPrefEnv(options, done);
|
||||
Services.ppmm.releaseCachedProcesses();
|
||||
});
|
||||
|
||||
Services.ppmm.releaseCachedProcesses();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче