Don't do isolated copy when we don't need to

This commit is contained in:
Jarred Sumner
2022-01-22 18:32:06 -08:00
parent 1576d183c9
commit 114c560912

View File

@@ -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));