Open
Bug 1604428
Opened 5 years ago
Updated 2 years ago
Cached console message stacktrace don't have promise callback asyncCause (but do have setTimeout ones)
Categories
(DevTools :: Console, defect, P2)
DevTools
Console
Tracking
(Not tracked)
NEW
People
(Reporter: nchevobbe, Unassigned)
Details
Steps to reproduce
- Apply https://phabricator.services.mozilla.com/D57441?id=208975
- Run the test
Expected results
The test passes
Actual results
The test fails, as the stacktraces are missing frames:
Got:
onTimeout
(Async: setTimeout handler)
timeout
onPromiseThen
Expected
onTimeout
(Async: setTimeout handler)
timeout
onPromiseThen
(Async: promise callback)
promiseThen
<anonymous>
Here's the script to generate the trace:
function timeout(cb, delay) {
setTimeout(cb, delay);
}
function promiseThen(cb) {
Promise.resolve().then(cb);
}
const onTimeout = () => {
console.trace("Trace message");
console.error("console error message");
throw new Error("Thrown error message");
};
const onPromiseThen = () => timeout(onTimeout, 1);
promiseThen(onPromiseThen);
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•