mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1529516 - [marionette] Make stacktrace of logged TimedPromise contain the upper stack. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D20637 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
5014792038
commit
8116bbe8f7
@ -213,6 +213,8 @@ function TimedPromise(fn,
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let trace;
|
||||
|
||||
// Reject only if |throws| is given. Otherwise it is assumed that
|
||||
// the user is OK with the promise timing out.
|
||||
let bail = () => {
|
||||
@ -220,11 +222,12 @@ function TimedPromise(fn,
|
||||
let err = new throws();
|
||||
reject(err);
|
||||
} else {
|
||||
log.warn(`TimedPromise timed out after ${timeout} ms`, stack());
|
||||
log.warn(`TimedPromise timed out after ${timeout} ms`, trace);
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
|
||||
trace = stack();
|
||||
timer.initWithCallback({notify: bail}, timeout, TYPE_ONE_SHOT);
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user