Closed
Bug 1636691
Opened 5 years ago
Closed 5 years ago
Improve stack information for promises due to exception in then/catch handlers
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla78
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: evilpies, Assigned: evilpies)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
It seems like we just drop the exception stack when a promise resolve/reject callback throws. In particular MaybeGetAndClearException
just ignores the exception stack. Instead we should probably propagate that stack through various Promise methods.
Compare
js> Promise.reject("foobar")
js> quit()
Unhandled rejection: "foobar"
Stack:
@typein:1:9
and
js> Promise.resolve().then(() => { throw "foobar"; })
js> quit()
Unhandled rejection: "foobar"
(no stack trace available)
We already have the pending exception stack, we might as well use it.
This helps in cases where we reject the promises but the current stack is already empty again.
Updated•5 years ago
|
Assignee: nobody → evilpies
Updated•5 years ago
|
Severity: -- → N/A
Priority: -- → P3
Updated•5 years ago
|
Attachment #9147054 -
Attachment description: Bug 1636691 - Use pending exception stack as rejection stack for Promises. r?arai → Bug 1636691 - Use pending exception stack as rejection stack for Promises. r?arai<Paste>
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/2b2753c09568
Use pending exception stack as rejection stack for Promises. r=arai<Paste>
Comment 4•5 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 5 years ago → 5 years ago
status-firefox78:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in
before you can comment on or make changes to this bug.
Description
•