mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 05:42:43 +00:00
Don't do isolated copy when we don't need to
This commit is contained in:
@@ -89,13 +89,9 @@ static const WTF::String toString(ZigString str) {
|
||||
reinterpret_cast<const UChar *>(str.ptr), str.len));
|
||||
}
|
||||
|
||||
static const WTF::String toStringCopy(ZigString str) {
|
||||
return toString(str).isolatedCopy();
|
||||
}
|
||||
static const WTF::String toStringCopy(ZigString str) { return toString(str).isolatedCopy(); }
|
||||
|
||||
static WTF::String toStringNotConst(ZigString str) {
|
||||
return toString(str).isolatedCopy();
|
||||
}
|
||||
static WTF::String toStringNotConst(ZigString str) { return toString(str); }
|
||||
|
||||
static const JSC::JSString *toJSString(ZigString str, JSC::JSGlobalObject *global) {
|
||||
return JSC::jsOwnedString(global->vm(), toString(str));
|
||||
|
||||
Reference in New Issue
Block a user