RESOLVED FIXED305789
Error.captureStackTrace() is not working
https://bugs.webkit.org/show_bug.cgi?id=305789
Summary Error.captureStackTrace() is not working
Alex Schwartz
Reported 2026-01-19 12:52:08 PST
```js function wrapper(x) { if (x === 5) { const e = new Error Error.captureStackTrace(e, wrapper) throw e } return 7 } Promise.try(() => { const x = wrapper(5) }).catch(err => { console.log(err.stack) }) ``` --- # Chromium Output Error at <anonymous>:11:15 at Promise.try (<anonymous>) at <anonymous>:10:12 # Chromium Output without Error.captureStackTrace() Error at wrapper (<anonymous>:3:19) at <anonymous>:11:15 at Promise.try (<anonymous>) at <anonymous>:10:12 --- # Firefox Output @debugger eval code:11:22 @debugger eval code:10:9 # Firefox Output without Error.captureStackTrace() wrapper@debugger eval code:3:19 @debugger eval code:11:22 @debugger eval code:10:9 --- # Webkit Output wrapper@ @ try@[native code] global code@ # Webkit Output without Error.captureStackTrace() wrapper@ @ try@[native code] global code@
Attachments
Alex Schwartz
Comment 1 2026-01-19 12:54:29 PST
I would expect the "Webkit Output" section (where Error.captureStackTrace() is used) to be smaller than the "Webkit Output without Error.captureStackTrace()" section
Alex Schwartz
Comment 2 2026-01-19 12:55:38 PST
I used Epiphany Technology Preview
Alex Schwartz
Comment 3 2026-01-21 10:17:08 PST
original PR for this feature: https://github.com/WebKit/WebKit/pull/16790
Radar WebKit Bug Importer
Comment 4 2026-01-26 12:53:12 PST
Shu-yu Guo
Comment 5 2026-01-27 20:32:20 PST
EWS
Comment 6 2026-01-28 09:52:12 PST
Committed 306356@main (0e62abf49f09): <https://commits.webkit.org/306356@main> Reviewed commits have been landed. Closing PR #57384 and removing active labels.
Alex Schwartz
Comment 7 2026-01-28 10:32:22 PST
Can confirm this fixes my issue Thank you!
Note You need to log in before you can comment on or make changes to this bug.