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 <[email protected]> Reviewed-By: Masashi Hirano <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anto Aravinth <[email protected]>
- Loading branch information
For anyone following along, docs for
Error.prepareStackTrace
are here: https://v8.dev/docs/stack-trace-api#customizing-stack-traces