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 <noreply@anthropic.com>
This commit is contained in:
Claude Bot
2026-02-24 01:14:39 +00:00
parent 09f5a0fac0
commit 9c09d082fc
2 changed files with 5 additions and 7 deletions

View File

@@ -541,7 +541,7 @@ WTF::String computeErrorInfoWrapperToString(JSC::VM& vm, Vector<StackFrame>& 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;
}
}

View File

@@ -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<JSC::StackFrame>& stackTrace, unsigned int& line_in, unsigned int& column_in, WTF::String& sourceURL, void* bunErrorData);
JSC::JSValue computeErrorInfoWrapperToJSValue(JSC::VM& vm, WTF::Vector<JSC::StackFrame>& 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 {