Bug 1237808 - Include asyncCaller when iterating rejection frames. r=Yoric
--- a/toolkit/modules/Promise-backend.js
+++ b/toolkit/modules/Promise-backend.js
@@ -189,24 +189,24 @@ var PendingErrors = {
} else {
// Components.stack to the rescue!
stack = Components.stack;
// Remove those top frames that refer to Promise.jsm.
while (stack) {
if (!stack.filename.endsWith("/Promise.jsm")) {
break;
}
- stack = stack.caller;
+ stack = stack.asyncCaller || stack.caller;
}
}
if (stack) {
let frames = [];
while (stack) {
frames.push(stack);
- stack = stack.caller;
+ stack = stack.asyncCaller || stack.caller;
}
value.stack = frames.join("\n");
}
}
} catch (ex) {
// Ignore value
}
this._map.set(id, value);