aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/ErrorStackTrace.cpp
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-12 00:39:11 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-12 00:39:11 -0700
commit07f8b23350f495131e949b5aab1ebd436c5be949 (patch)
treeb23b2dddc325eea4ffbc1a03a424afb8d18a6a27 /src/bun.js/bindings/ErrorStackTrace.cpp
parentb566573977a8e5cad3dfd69441c61152235bcafc (diff)
downloadbun-jarred/faster-error-capturestacktrace.tar.gz
bun-jarred/faster-error-capturestacktrace.tar.zst
bun-jarred/faster-error-capturestacktrace.zip
Make Error.captureStackTrace 4x fasterjarred/faster-error-capturestacktrace
Diffstat (limited to 'src/bun.js/bindings/ErrorStackTrace.cpp')
-rw-r--r--src/bun.js/bindings/ErrorStackTrace.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/bindings/ErrorStackTrace.cpp b/src/bun.js/bindings/ErrorStackTrace.cpp
index 59e0e765b..87627a482 100644
--- a/src/bun.js/bindings/ErrorStackTrace.cpp
+++ b/src/bun.js/bindings/ErrorStackTrace.cpp
@@ -19,7 +19,7 @@ using namespace WebCore;
namespace Zig {
-JSCStackTrace JSCStackTrace::fromExisting(JSC::VM& vm, const WTF::Vector<JSC::StackFrame>& existingFrames)
+JSCStackTrace JSCStackTrace::fromExisting(JSC::VM& vm, const WTF::Vector<JSC::StackFrame>& existingFrames, int skipCount)
{
WTF::Vector<JSCStackFrame> newFrames;
@@ -29,7 +29,7 @@ JSCStackTrace JSCStackTrace::fromExisting(JSC::VM& vm, const WTF::Vector<JSC::St
}
newFrames.reserveInitialCapacity(frameCount);
- for (size_t i = 0; i < frameCount; i++) {
+ for (size_t i = skipCount; i < frameCount; i++) {
newFrames.constructAndAppend(vm, existingFrames.at(i));
}