X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/b80e619319b1def83d1e8b4f84042b661be1be7f..14957cd040308e3eeec43d26bae5d76da13fcd85:/API/JSStringRef.cpp diff --git a/API/JSStringRef.cpp b/API/JSStringRef.cpp index 8e236e4..ea31da6 100644 --- a/API/JSStringRef.cpp +++ b/API/JSStringRef.cpp @@ -36,7 +36,7 @@ using namespace WTF::Unicode; JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars) { initializeThreading(); - return OpaqueJSString::create(chars, numChars).releaseRef(); + return OpaqueJSString::create(chars, numChars).leakRef(); } JSStringRef JSStringCreateWithUTF8CString(const char* string) @@ -47,11 +47,11 @@ JSStringRef JSStringCreateWithUTF8CString(const char* string) Vector buffer(length); UChar* p = buffer.data(); if (conversionOK == convertUTF8ToUTF16(&string, string + length, &p, p + length)) - return OpaqueJSString::create(buffer.data(), p - buffer.data()).releaseRef(); + return OpaqueJSString::create(buffer.data(), p - buffer.data()).leakRef(); } // Null string. - return OpaqueJSString::create().releaseRef(); + return OpaqueJSString::create().leakRef(); } JSStringRef JSStringRetain(JSStringRef string)