Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util: fix wrong usage of Error.prepareStackTrace
The return value of Error.prepareStackTrace will become the result of Error.stack accesses. Setting Error.stack inside this callback relies on the fact that the magic get accessor detects the change in the middle of formatting, and is unnecessary in this instance. Refs: v8#96 PR-URL: #27250 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
- Loading branch information
For anyone following along, docs for
Error.prepareStackTrace
are here: https://v8.dev/docs/stack-trace-api#customizing-stack-traces