Compare commits

...

7 Commits

Author SHA1 Message Date
Dylan Conway
360925bb37 Merge branch 'main' into dylan/ref-string 2024-10-15 16:44:18 -07:00
Dylan Conway
e678a4220f Merge branch 'main' into dylan/ref-string 2024-10-12 00:49:20 -07:00
Dylan Conway
09c57f5887 Revert "avoid integer overflow with empty string"
This reverts commit 0f2b44a889.
2024-10-12 00:43:19 -07:00
Dylan Conway
091d279b7f Revert "add test"
This reverts commit 83a8b03224.
2024-10-12 00:43:18 -07:00
Dylan Conway
83a8b03224 add test 2024-10-12 00:29:25 -07:00
Dylan Conway
0f2b44a889 avoid integer overflow with empty string 2024-10-12 00:25:24 -07:00
Dylan Conway
2d2643f2f4 make sure ref 2024-10-11 23:38:04 -07:00

View File

@@ -152,11 +152,11 @@ BunString toStringRef(JSC::JSGlobalObject* globalObject, JSValue value)
return { BunStringTag::Empty };
}
StringImpl* impl = str.impl();
auto impl = str.releaseImpl();
impl->ref();
return { BunStringTag::WTFStringImpl, { .wtf = impl } };
return { BunStringTag::WTFStringImpl, { .wtf = impl.leakRef() } };
}
BunString toString(WTF::String& wtfString)