[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

xan at webkit.org xan at webkit.org
Wed Dec 22 15:29:48 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 9e1d894962ee17fbf09452de0c0da5ec6eca6a74
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 5 01:16:27 2010 +0000

    2010-11-04  Xan Lopez  <xlopez at igalia.com>
    
            Reviewed by Adam Barth.
    
            Use leakRef instead of releaseRef
            https://bugs.webkit.org/show_bug.cgi?id=48974
    
            Use leakRef instead of the deprecated releaseRef. This was renamed
            some time ago because 'releaseRef' is too close to 'release',
            which does something completely different.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71375 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/API/JSContextRef.cpp b/JavaScriptCore/API/JSContextRef.cpp
index 926badc..ccab953 100644
--- a/JavaScriptCore/API/JSContextRef.cpp
+++ b/JavaScriptCore/API/JSContextRef.cpp
@@ -46,7 +46,7 @@ using namespace JSC;
 JSContextGroupRef JSContextGroupCreate()
 {
     initializeThreading();
-    return toRef(JSGlobalData::createContextGroup(ThreadStackTypeSmall).releaseRef());
+    return toRef(JSGlobalData::createContextGroup(ThreadStackTypeSmall).leakRef());
 }
 
 JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group)
diff --git a/JavaScriptCore/API/JSObjectRef.cpp b/JavaScriptCore/API/JSObjectRef.cpp
index 8bd33d6..4198ca8 100644
--- a/JavaScriptCore/API/JSObjectRef.cpp
+++ b/JavaScriptCore/API/JSObjectRef.cpp
@@ -59,7 +59,7 @@ JSClassRef JSClassCreate(const JSClassDefinition* definition)
         ? OpaqueJSClass::createNoAutomaticPrototype(definition)
         : OpaqueJSClass::create(definition);
     
-    return jsClass.release().releaseRef();
+    return jsClass.release().leakRef();
 }
 
 JSClassRef JSClassRetain(JSClassRef jsClass)
@@ -507,7 +507,7 @@ JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef o
     size_t size = array.size();
     propertyNames->array.reserveInitialCapacity(size);
     for (size_t i = 0; i < size; ++i)
-        propertyNames->array.append(JSRetainPtr<JSStringRef>(Adopt, OpaqueJSString::create(array[i].ustring()).releaseRef()));
+        propertyNames->array.append(JSRetainPtr<JSStringRef>(Adopt, OpaqueJSString::create(array[i].ustring()).leakRef()));
     
     return JSPropertyNameArrayRetain(propertyNames);
 }
diff --git a/JavaScriptCore/API/JSStringRef.cpp b/JavaScriptCore/API/JSStringRef.cpp
index 8e236e4..ea31da6 100644
--- a/JavaScriptCore/API/JSStringRef.cpp
+++ b/JavaScriptCore/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<UChar, 1024> 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)
diff --git a/JavaScriptCore/API/JSStringRefCF.cpp b/JavaScriptCore/API/JSStringRefCF.cpp
index d1f6fe3..e0961d0 100644
--- a/JavaScriptCore/API/JSStringRefCF.cpp
+++ b/JavaScriptCore/API/JSStringRefCF.cpp
@@ -45,9 +45,9 @@ JSStringRef JSStringCreateWithCFString(CFStringRef string)
         OwnArrayPtr<UniChar> buffer(new UniChar[length]);
         CFStringGetCharacters(string, CFRangeMake(0, length), buffer.get());
         COMPILE_ASSERT(sizeof(UniChar) == sizeof(UChar), unichar_and_uchar_must_be_same_size);
-        return OpaqueJSString::create(reinterpret_cast<UChar*>(buffer.get()), length).releaseRef();
+        return OpaqueJSString::create(reinterpret_cast<UChar*>(buffer.get()), length).leakRef();
     } else {
-        return OpaqueJSString::create(0, 0).releaseRef();
+        return OpaqueJSString::create(0, 0).leakRef();
     }
 }
 
diff --git a/JavaScriptCore/API/JSValueRef.cpp b/JavaScriptCore/API/JSValueRef.cpp
index b8dd7c6..faf4712 100644
--- a/JavaScriptCore/API/JSValueRef.cpp
+++ b/JavaScriptCore/API/JSValueRef.cpp
@@ -252,7 +252,7 @@ JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef apiValue, unsig
         exec->clearException();
         return 0;
     }
-    return OpaqueJSString::create(result).releaseRef();
+    return OpaqueJSString::create(result).leakRef();
 }
 
 bool JSValueToBoolean(JSContextRef ctx, JSValueRef value)
@@ -295,7 +295,7 @@ JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef*
         exec->clearException();
         stringRef.clear();
     }
-    return stringRef.release().releaseRef();
+    return stringRef.release().leakRef();
 }
 
 JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception)
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index aad5d22..616e6f7 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-04  Xan Lopez  <xlopez at igalia.com>
+
+        Reviewed by Adam Barth.
+
+        Use leakRef instead of releaseRef
+        https://bugs.webkit.org/show_bug.cgi?id=48974
+
+        Use leakRef instead of the deprecated releaseRef. This was renamed
+        some time ago because 'releaseRef' is too close to 'release',
+        which does something completely different.
+
 2010-11-04  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Gavin Barraclough.
@@ -6381,7 +6392,7 @@
         once. Added a clear function.
 
         * wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef.
-
+n
         * wtf/RefPtr.h: Changed all uses of "template <...>" to instead do
         "template<...>". Tidied up declarations and comments a bit.
          Changed all uses of releaseRef to leakRef.
diff --git a/JavaScriptCore/bytecode/CodeBlock.h b/JavaScriptCore/bytecode/CodeBlock.h
index e4ebeb8..68acae4 100644
--- a/JavaScriptCore/bytecode/CodeBlock.h
+++ b/JavaScriptCore/bytecode/CodeBlock.h
@@ -678,7 +678,7 @@ namespace JSC {
         // symbol table, so we just pass as a raw pointer with a ref count of 1.  We then manually deref
         // in the destructor.
         FunctionCodeBlock(FunctionExecutable* ownerExecutable, CodeType codeType, JSGlobalObject* globalObject, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset, bool isConstructor)
-            : CodeBlock(ownerExecutable, codeType, globalObject, sourceProvider, sourceOffset, SharedSymbolTable::create().releaseRef(), isConstructor)
+            : CodeBlock(ownerExecutable, codeType, globalObject, sourceProvider, sourceOffset, SharedSymbolTable::create().leakRef(), isConstructor)
         {
         }
         ~FunctionCodeBlock()
diff --git a/JavaScriptCore/jsc.cpp b/JavaScriptCore/jsc.cpp
index 16647ec..00581e5 100644
--- a/JavaScriptCore/jsc.cpp
+++ b/JavaScriptCore/jsc.cpp
@@ -343,7 +343,7 @@ int main(int argc, char** argv)
     // We can't use destructors in the following code because it uses Windows
     // Structured Exception Handling
     int res = 0;
-    JSGlobalData* globalData = JSGlobalData::create(ThreadStackTypeLarge).releaseRef();
+    JSGlobalData* globalData = JSGlobalData::create(ThreadStackTypeLarge).leakRef();
     TRY
         res = jscmain(argc, argv, globalData);
     EXCEPT(res = 3)
diff --git a/JavaScriptCore/runtime/Identifier.cpp b/JavaScriptCore/runtime/Identifier.cpp
index d375eff..d4069ba 100644
--- a/JavaScriptCore/runtime/Identifier.cpp
+++ b/JavaScriptCore/runtime/Identifier.cpp
@@ -101,7 +101,7 @@ struct IdentifierCStringTranslator {
     {
         size_t length = strlen(c);
         UChar* d;
-        StringImpl* r = StringImpl::createUninitialized(length, d).releaseRef();
+        StringImpl* r = StringImpl::createUninitialized(length, d).leakRef();
         for (size_t i = 0; i != length; i++)
             d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend
         r->setHash(hash);
@@ -160,7 +160,7 @@ struct IdentifierUCharBufferTranslator {
     static void translate(StringImpl*& location, const UCharBuffer& buf, unsigned hash)
     {
         UChar* d;
-        StringImpl* r = StringImpl::createUninitialized(buf.length, d).releaseRef();
+        StringImpl* r = StringImpl::createUninitialized(buf.length, d).leakRef();
         for (unsigned i = 0; i != buf.length; i++)
             d[i] = buf.s[i];
         r->setHash(hash);
diff --git a/JavaScriptCore/runtime/JSObject.h b/JavaScriptCore/runtime/JSObject.h
index 8981469..f484ce4 100644
--- a/JavaScriptCore/runtime/JSObject.h
+++ b/JavaScriptCore/runtime/JSObject.h
@@ -340,7 +340,7 @@ inline void JSObject::setPrototype(JSValue prototype)
 inline void JSObject::setStructure(NonNullPassRefPtr<Structure> structure)
 {
     m_structure->deref();
-    m_structure = structure.releaseRef(); // ~JSObject balances this ref()
+    m_structure = structure.leakRef(); // ~JSObject balances this ref()
 }
 
 inline Structure* JSObject::inheritorID()
diff --git a/JavaScriptCore/runtime/JSString.h b/JavaScriptCore/runtime/JSString.h
index 4d81a2f..51b9f2d 100644
--- a/JavaScriptCore/runtime/JSString.h
+++ b/JavaScriptCore/runtime/JSString.h
@@ -216,7 +216,7 @@ namespace JSC {
             , m_length(rope->length())
             , m_fiberCount(1)
         {
-            m_other.m_fibers[0] = rope.releaseRef();
+            m_other.m_fibers[0] = rope.leakRef();
         }
         // This constructor constructs a new string by concatenating s1 & s2.
         // This should only be called with fiberCount <= 3.
diff --git a/JavaScriptCore/runtime/JSZombie.cpp b/JavaScriptCore/runtime/JSZombie.cpp
index 22aabb9..8a36bda 100644
--- a/JavaScriptCore/runtime/JSZombie.cpp
+++ b/JavaScriptCore/runtime/JSZombie.cpp
@@ -37,7 +37,7 @@ Structure* JSZombie::leakedZombieStructure() {
     static Structure* structure = 0;
     if (!structure) {
         Structure::startIgnoringLeaks();
-        structure = Structure::create(jsNull(), TypeInfo(UnspecifiedType), 0).releaseRef();
+        structure = Structure::create(jsNull(), TypeInfo(UnspecifiedType), 0).leakRef();
         Structure::stopIgnoringLeaks();
     }
     return structure;
diff --git a/JavaScriptCore/runtime/Lookup.cpp b/JavaScriptCore/runtime/Lookup.cpp
index 07416af..dac1c94 100644
--- a/JavaScriptCore/runtime/Lookup.cpp
+++ b/JavaScriptCore/runtime/Lookup.cpp
@@ -34,7 +34,7 @@ void HashTable::createTable(JSGlobalData* globalData) const
     for (int i = 0; i < compactSize; ++i)
         entries[i].setKey(0);
     for (int i = 0; values[i].key; ++i) {
-        StringImpl* identifier = Identifier::add(globalData, values[i].key).releaseRef();
+        StringImpl* identifier = Identifier::add(globalData, values[i].key).leakRef();
         int hashIndex = identifier->existingHash() & compactHashSizeMask;
         HashEntry* entry = &entries[hashIndex];
 
diff --git a/JavaScriptCore/wtf/text/AtomicString.cpp b/JavaScriptCore/wtf/text/AtomicString.cpp
index 7334271..c49a837 100644
--- a/JavaScriptCore/wtf/text/AtomicString.cpp
+++ b/JavaScriptCore/wtf/text/AtomicString.cpp
@@ -90,7 +90,7 @@ struct CStringTranslator {
 
     static void translate(StringImpl*& location, const char* const& c, unsigned hash)
     {
-        location = StringImpl::create(c).releaseRef(); 
+        location = StringImpl::create(c).leakRef();
         location->setHash(hash);
         location->setIsAtomic(true);
     }
@@ -174,7 +174,7 @@ struct UCharBufferTranslator {
 
     static void translate(StringImpl*& location, const UCharBuffer& buf, unsigned hash)
     {
-        location = StringImpl::create(buf.s, buf.length).releaseRef(); 
+        location = StringImpl::create(buf.s, buf.length).leakRef();
         location->setHash(hash);
         location->setIsAtomic(true);
     }
@@ -200,7 +200,7 @@ struct HashAndCharactersTranslator {
 
     static void translate(StringImpl*& location, const HashAndCharacters& buffer, unsigned hash)
     {
-        location = StringImpl::create(buffer.characters, buffer.length).releaseRef();
+        location = StringImpl::create(buffer.characters, buffer.length).leakRef();
         location->setHash(hash);
         location->setIsAtomic(true);
     }
diff --git a/JavaScriptCore/wtf/text/StringImpl.cpp b/JavaScriptCore/wtf/text/StringImpl.cpp
index e1e08ee..f4b2f05 100644
--- a/JavaScriptCore/wtf/text/StringImpl.cpp
+++ b/JavaScriptCore/wtf/text/StringImpl.cpp
@@ -144,7 +144,7 @@ SharedUChar* StringImpl::sharedBuffer()
         return m_substringBuffer->sharedBuffer();
     if (ownership == BufferOwned) {
         ASSERT(!m_sharedBuffer);
-        m_sharedBuffer = SharedUChar::create(new SharableUChar(m_data)).releaseRef();
+        m_sharedBuffer = SharedUChar::create(new SharableUChar(m_data)).leakRef();
         m_refCountAndFlags = (m_refCountAndFlags & ~s_refCountMaskBufferOwnership) | BufferShared;
     }
 
diff --git a/JavaScriptCore/wtf/text/StringImpl.h b/JavaScriptCore/wtf/text/StringImpl.h
index 897751d..8f0af52 100644
--- a/JavaScriptCore/wtf/text/StringImpl.h
+++ b/JavaScriptCore/wtf/text/StringImpl.h
@@ -110,7 +110,7 @@ private:
     StringImpl(const UChar* characters, unsigned length, PassRefPtr<StringImpl> base)
         : StringImplBase(length, BufferSubstring)
         , m_data(characters)
-        , m_substringBuffer(base.releaseRef())
+        , m_substringBuffer(base.leakRef())
         , m_hash(0)
     {
         ASSERT(m_data);
@@ -122,7 +122,7 @@ private:
     StringImpl(const UChar* characters, unsigned length, PassRefPtr<SharedUChar> sharedBuffer)
         : StringImplBase(length, BufferShared)
         , m_data(characters)
-        , m_sharedBuffer(sharedBuffer.releaseRef())
+        , m_sharedBuffer(sharedBuffer.leakRef())
         , m_hash(0)
     {
         ASSERT(m_data);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list