mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 21:01:52 +00:00
fix memory leak in ERR_INVALID_ARG_TYPE (#17169)
This commit is contained in:
@@ -202,8 +202,8 @@ JSObject* createError(Zig::JSGlobalObject* globalObject, ErrorCode code, JSC::JS
|
||||
return createError(vm, globalObject, code, message, isDOMExceptionPrototype);
|
||||
}
|
||||
|
||||
// export fn Bun__inspect(globalThis: *JSGlobalObject, value: JSValue) ZigString
|
||||
extern "C" ZigString Bun__inspect(JSC::JSGlobalObject* globalObject, JSValue value);
|
||||
// export fn Bun__inspect(globalThis: *JSGlobalObject, value: JSValue) bun.String
|
||||
extern "C" BunString Bun__inspect(JSC::JSGlobalObject* globalObject, JSValue value);
|
||||
|
||||
//
|
||||
WTF::String JSValueToStringSafe(JSC::JSGlobalObject* globalObject, JSValue arg)
|
||||
@@ -247,9 +247,7 @@ WTF::String JSValueToStringSafe(JSC::JSGlobalObject* globalObject, JSValue arg)
|
||||
}
|
||||
}
|
||||
|
||||
ZigString zstring = Bun__inspect(globalObject, arg);
|
||||
BunString bstring(BunStringTag::ZigString, BunStringImpl(zstring));
|
||||
return bstring.toWTFString();
|
||||
return Bun__inspect(globalObject, arg).transferToWTFString();
|
||||
}
|
||||
|
||||
WTF::String determineSpecificType(JSC::JSGlobalObject* globalObject, JSValue value)
|
||||
|
||||
Reference in New Issue
Block a user