mirror of
https://github.com/oven-sh/bun
synced 2026-02-24 18:47:18 +01:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user