diff options
author | 2023-07-11 21:01:35 -0700 | |
---|---|---|
committer | 2023-07-11 21:01:35 -0700 | |
commit | b566573977a8e5cad3dfd69441c61152235bcafc (patch) | |
tree | 588ffab9c9a8256a4919b82f93d1111a87d73fd8 /bench/snippets | |
parent | 666feb3b7e3fdfaa9e1cb7ece39095a83df09fd1 (diff) | |
download | bun-b566573977a8e5cad3dfd69441c61152235bcafc.tar.gz bun-b566573977a8e5cad3dfd69441c61152235bcafc.tar.zst bun-b566573977a8e5cad3dfd69441c61152235bcafc.zip |
Fix another crash in Error.captureStackTrace (#3611)bun-v0.6.14
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'bench/snippets')
-rw-r--r-- | bench/snippets/error-capturestack.mjs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bench/snippets/error-capturestack.mjs b/bench/snippets/error-capturestack.mjs new file mode 100644 index 000000000..0c59ff9c8 --- /dev/null +++ b/bench/snippets/error-capturestack.mjs @@ -0,0 +1,12 @@ +import { bench, run } from "./runner.mjs"; + +var err = new Error(); +bench("Error.captureStackTrace(err)", () => { + Error.captureStackTrace(err); +}); + +bench("Error.prototype.stack", () => { + new Error().stack; +}); + +await run(); |