From 9c09d082fce5fbaecaa237d2bf233f4feb14bedc Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Tue, 24 Feb 2026 01:14:39 +0000 Subject: [PATCH] fix(profiler): update computeLineColumnWithSourcemap to use String& instead of String* Match the updated WebKit callback signature that uses a reference parameter instead of a pointer for the remapped URL output. Co-Authored-By: Claude --- src/bun.js/bindings/FormatStackTraceForJS.cpp | 10 ++++------ src/bun.js/bindings/FormatStackTraceForJS.h | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/bun.js/bindings/FormatStackTraceForJS.cpp b/src/bun.js/bindings/FormatStackTraceForJS.cpp index e673ce9b4d..153f656eb8 100644 --- a/src/bun.js/bindings/FormatStackTraceForJS.cpp +++ b/src/bun.js/bindings/FormatStackTraceForJS.cpp @@ -541,7 +541,7 @@ WTF::String computeErrorInfoWrapperToString(JSC::VM& vm, Vector& sta return result; } -void computeLineColumnWithSourcemap(JSC::VM& vm, JSC::SourceProvider* _Nonnull sourceProvider, JSC::LineColumn& lineColumn, WTF::String* remappedURL) +void computeLineColumnWithSourcemap(JSC::VM& vm, JSC::SourceProvider* _Nonnull sourceProvider, JSC::LineColumn& lineColumn, WTF::String& remappedURL) { auto sourceURL = sourceProvider->sourceURL(); if (sourceURL.isEmpty()) { @@ -561,11 +561,9 @@ void computeLineColumnWithSourcemap(JSC::VM& vm, JSC::SourceProvider* _Nonnull s if (frame.remapped) { lineColumn.line = frame.position.line().oneBasedInt(); lineColumn.column = frame.position.column().oneBasedInt(); - if (remappedURL) { - WTF::String newURL = frame.source_url.toWTFString(); - if (!newURL.isEmpty() && newURL != sourceURL) - *remappedURL = newURL; - } + WTF::String newURL = frame.source_url.toWTFString(); + if (!newURL.isEmpty() && newURL != sourceURL) + remappedURL = newURL; } } diff --git a/src/bun.js/bindings/FormatStackTraceForJS.h b/src/bun.js/bindings/FormatStackTraceForJS.h index 00258fae4a..bb29ce3523 100644 --- a/src/bun.js/bindings/FormatStackTraceForJS.h +++ b/src/bun.js/bindings/FormatStackTraceForJS.h @@ -82,7 +82,7 @@ JSC_DECLARE_CUSTOM_SETTER(errorInstanceLazyStackCustomSetter); // Internal wrapper functions for JSC error info callbacks WTF::String computeErrorInfoWrapperToString(JSC::VM& vm, WTF::Vector& stackTrace, unsigned int& line_in, unsigned int& column_in, WTF::String& sourceURL, void* bunErrorData); JSC::JSValue computeErrorInfoWrapperToJSValue(JSC::VM& vm, WTF::Vector& stackTrace, unsigned int& line_in, unsigned int& column_in, WTF::String& sourceURL, JSC::JSObject* errorInstance, void* bunErrorData); -void computeLineColumnWithSourcemap(JSC::VM& vm, JSC::SourceProvider* _Nonnull sourceProvider, JSC::LineColumn& lineColumn, WTF::String* remappedURL); +void computeLineColumnWithSourcemap(JSC::VM& vm, JSC::SourceProvider* _Nonnull sourceProvider, JSC::LineColumn& lineColumn, WTF::String& remappedURL); } // namespace Bun namespace Zig {