diff options
Diffstat (limited to 'src/bun.js/bindings/ZigGlobalObject.cpp')
-rw-r--r-- | src/bun.js/bindings/ZigGlobalObject.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index b69a4ebb3..c00670289 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -2861,15 +2861,13 @@ JSC_DEFINE_HOST_FUNCTION(errorConstructorFuncCaptureStackTrace, (JSC::JSGlobalOb errorObject->putDirect(vm, vm.propertyNames->stack, formattedStackTrace, 0); - if (!(caller && caller.isObject())) { - if (auto* instance = jsDynamicCast<JSC::ErrorInstance*>(errorObject)) { - // we make a separate copy of the StackTrace unfortunately so that we - // can later console.log it without losing the info - // - // This is not good. We should remove this in the future as it strictly makes this function - // already slower than necessary. - instance->captureStackTrace(vm, globalObject, 1, false); - } + if (auto* instance = jsDynamicCast<JSC::ErrorInstance*>(errorObject)) { + // we make a separate copy of the StackTrace unfortunately so that we + // can later console.log it without losing the info + // + // This is not good. We should remove this in the future as it strictly makes this function + // already slower than necessary. + instance->captureStackTrace(vm, globalObject, 1, false); } RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode(JSValue {})); |