Bug 260326
| Summary: | Add support for Error.captureStackTrace | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Keith Miller <keith_miller> |
| Component: | JavaScriptCore | Assignee: | Keith Miller <keith_miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | jarred, mark.lam, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Keith Miller
v8 has this API and it shows up in benchmarks. We should support it too.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Jarred Sumner
oh nice
We implemented this in Bun, but I don't feel great about our implementation. We based it on the node-jsc implementation from years ago and we didn't have as good of an understanding of JSC internals when it was implemented.
One thing we also did somewhat related to this was add an `onComputeError` WTF::Function in JSC::VM which lets us provide a sourcemapped Error.prototype.stack property and match the V8 stack string format (so that libraries expecting it work). ErrorInstance calls this to generate the stack string
Keith Miller
Pull request: https://github.com/WebKit/WebKit/pull/16790
EWS
Committed 267010@main (997e074bb35e): <https://commits.webkit.org/267010@main>
Reviewed commits have been landed. Closing PR #16790 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/114042574>
Mark Lam
<rdar://problem/113767788>