зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1027033 - AsyncShutdown errors should cause test failures but should not break AsyncShutdown. r=froydnj
This commit is contained in:
Родитель
ad8fba4501
Коммит
44fd50ee30
|
@ -341,7 +341,13 @@ Spinner.prototype = {
|
|||
promise.then(() => satisfied = true); // This promise cannot reject
|
||||
let thread = Services.tm.mainThread;
|
||||
while (!satisfied) {
|
||||
thread.processNextEvent(true);
|
||||
try {
|
||||
thread.processNextEvent(true);
|
||||
} catch (ex) {
|
||||
// An uncaught error should not stop us, but it should still
|
||||
// be reported and cause tests to fail.
|
||||
Promise.reject(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -590,6 +596,10 @@ Barrier.prototype = Object.freeze({
|
|||
" Phase: " + topic +
|
||||
" State: " + safeGetState(fetchState);
|
||||
warn(msg, error);
|
||||
|
||||
// The error should remain uncaught, to ensure that it
|
||||
// still causes tests to fail.
|
||||
Promise.reject(error);
|
||||
});
|
||||
condition.then(() => indirection.resolve());
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче