X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73..1981f5dfe8d77d97469d20652f712a09400c48ed:/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)