mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 1027033 - AsyncShutdown errors should cause test failures but should not break AsyncShutdown. r=froydnj
This commit is contained in:
parent
ad8fba4501
commit
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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user