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

abarth at webkit.org abarth at webkit.org
Wed Dec 22 11:54:43 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fbcc55e0cbb4252963a12e0ffd177b628a538a09
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 11 07:08:23 2010 +0000

    2010-08-10  Darin Adler  <darin at apple.com>
    
            Reviewed by Sam Weinig.
    
            Add leakRef and clear to all RefPtr variants
            https://bugs.webkit.org/show_bug.cgi?id=42389
    
            * API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do
            "template<...>". We should probably put this in the style guide and do it
            consitently. Fixed other minor style issues. Defined many of the inlined
            functions outside the class definition, to avoid style checker warnings
            about multiple statements on a single line and for slightly better clarity
            of the class definition itself. Renamed releaseRef to leakRef. Added a
            releaseRef that calls leakRef so we don't have to rename all callers oat
            once. Added a clear function.
    
            * wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef.
    
            * 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.
    
            * wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do
            "template<...>". Defined many of the inlined functions outside the class
            definition, to avoid style checker warnings about multiple statements on
            a single line and for slightly better clarity of the class definition itself.
            Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
            don't have to rename all callers at once. Added a clear function.
    2010-08-10  Darin Adler  <darin at apple.com>
    
            Reviewed by Sam Weinig.
    
            Add leakRef and clear to all RefPtr variants
            https://bugs.webkit.org/show_bug.cgi?id=42389
    
            * platform/win/COMPtr.h: Changed all uses of "template <...>" to instead do
            "template<...>". Defined many of the inlined functions outside the class
            definition, to avoid style checker warnings about multiple statements on
            a single line and for slightly better clarity of the class definition itself.
            Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
            don't have to rename all callers at once. Added a clear function. Changed
            the hash table code so it doesn't need to call releaseRef, and so it uses
            the hash table deleted value hooks already present within the class.
    2010-08-10  Darin Adler  <darin at apple.com>
    
            Reviewed by Sam Weinig.
    
            Add leakRef and clear to all RefPtr variants
            https://bugs.webkit.org/show_bug.cgi?id=42389
    
            * UIProcess/API/cpp/WKRetainPtr.h: Changed all uses of "template <...>" to
            "template<...>". Defined many of the inlined functions outside the class
            definition, to avoid style checker warnings about multiple statements on
            a single line and for slightly better clarity of the class definition itself.
            Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
            don't have to rename all callers at once. Added a clear function.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65130 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/API/JSRetainPtr.h b/JavaScriptCore/API/JSRetainPtr.h
index 69c6de1..a884f38 100644
--- a/JavaScriptCore/API/JSRetainPtr.h
+++ b/JavaScriptCore/API/JSRetainPtr.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -37,23 +37,20 @@ inline void JSRelease(JSStringRef string) { JSStringRelease(string); }
 
 enum AdoptTag { Adopt };
 
-template <typename T> class JSRetainPtr {
+template<typename T> class JSRetainPtr {
 public:
-    JSRetainPtr() : m_ptr(0) {}
+    JSRetainPtr() : m_ptr(0) { }
     JSRetainPtr(T ptr) : m_ptr(ptr) { if (ptr) JSRetain(ptr); }
-
     JSRetainPtr(AdoptTag, T ptr) : m_ptr(ptr) { }
-    
-    JSRetainPtr(const JSRetainPtr& o) : m_ptr(o.m_ptr) { if (T ptr = m_ptr) JSRetain(ptr); }
-
-    ~JSRetainPtr() { if (T ptr = m_ptr) JSRelease(ptr); }
-    
-    template <typename U> JSRetainPtr(const JSRetainPtr<U>& o) : m_ptr(o.get()) { if (T ptr = m_ptr) JSRetain(ptr); }
+    JSRetainPtr(const JSRetainPtr&);
+    template<typename U> JSRetainPtr(const JSRetainPtr<U>&);
+    ~JSRetainPtr();
     
     T get() const { return m_ptr; }
     
-    T releaseRef() { T tmp = m_ptr; m_ptr = 0; return tmp; }
-    
+    void clear();
+    T leakRef();
+
     T operator->() const { return m_ptr; }
     
     bool operator!() const { return !m_ptr; }
@@ -63,19 +60,57 @@ public:
     operator UnspecifiedBoolType() const { return m_ptr ? &JSRetainPtr::m_ptr : 0; }
     
     JSRetainPtr& operator=(const JSRetainPtr&);
-    template <typename U> JSRetainPtr& operator=(const JSRetainPtr<U>&);
+    template<typename U> JSRetainPtr& operator=(const JSRetainPtr<U>&);
     JSRetainPtr& operator=(T);
-    template <typename U> JSRetainPtr& operator=(U*);
+    template<typename U> JSRetainPtr& operator=(U*);
 
     void adopt(T);
     
     void swap(JSRetainPtr&);
 
+    // FIXME: Remove releaseRef once we change all callers to call leakRef instead.
+    T releaseRef() { return leakRef(); }
+
 private:
     T m_ptr;
 };
 
-template <typename T> inline JSRetainPtr<T>& JSRetainPtr<T>::operator=(const JSRetainPtr<T>& o)
+template<typename T> inline JSRetainPtr<T>::JSRetainPtr(const JSRetainPtr& o)
+    : m_ptr(o.m_ptr)
+{
+    if (m_ptr)
+        JSRetain(m_ptr);
+}
+
+template<typename T> template<typename U> inline JSRetainPtr<T>::JSRetainPtr(const JSRetainPtr<U>& o)
+    : m_ptr(o.get())
+{
+    if (m_ptr)
+        JSRetain(m_ptr);
+}
+
+template<typename T> inline JSRetainPtr<T>::~JSRetainPtr()
+{
+    if (m_ptr)
+        JSRelease(m_ptr);
+}
+
+template<typename T> inline void JSRetainPtr<T>::clear()
+{
+    if (T ptr = m_ptr) {
+        m_ptr = 0;
+        JSRelease(ptr);
+    }
+}
+
+template<typename T> inline T JSRetainPtr<T>::leakRef()
+{
+    T ptr = m_ptr;
+    m_ptr = 0;
+    return ptr;
+}
+
+template<typename T> inline JSRetainPtr<T>& JSRetainPtr<T>::operator=(const JSRetainPtr<T>& o)
 {
     T optr = o.get();
     if (optr)
@@ -87,7 +122,7 @@ template <typename T> inline JSRetainPtr<T>& JSRetainPtr<T>::operator=(const JSR
     return *this;
 }
 
-template <typename T> template <typename U> inline JSRetainPtr<T>& JSRetainPtr<T>::operator=(const JSRetainPtr<U>& o)
+template<typename T> template<typename U> inline JSRetainPtr<T>& JSRetainPtr<T>::operator=(const JSRetainPtr<U>& o)
 {
     T optr = o.get();
     if (optr)
@@ -99,7 +134,7 @@ template <typename T> template <typename U> inline JSRetainPtr<T>& JSRetainPtr<T
     return *this;
 }
 
-template <typename T> inline JSRetainPtr<T>& JSRetainPtr<T>::operator=(T optr)
+template<typename T> inline JSRetainPtr<T>& JSRetainPtr<T>::operator=(T optr)
 {
     if (optr)
         JSRetain(optr);
@@ -110,7 +145,7 @@ template <typename T> inline JSRetainPtr<T>& JSRetainPtr<T>::operator=(T optr)
     return *this;
 }
 
-template <typename T> inline void JSRetainPtr<T>::adopt(T optr)
+template<typename T> inline void JSRetainPtr<T>::adopt(T optr)
 {
     T ptr = m_ptr;
     m_ptr = optr;
@@ -118,7 +153,7 @@ template <typename T> inline void JSRetainPtr<T>::adopt(T optr)
         JSRelease(ptr);
 }
 
-template <typename T> template <typename U> inline JSRetainPtr<T>& JSRetainPtr<T>::operator=(U* optr)
+template<typename T> template<typename U> inline JSRetainPtr<T>& JSRetainPtr<T>::operator=(U* optr)
 {
     if (optr)
         JSRetain(optr);
@@ -129,42 +164,42 @@ template <typename T> template <typename U> inline JSRetainPtr<T>& JSRetainPtr<T
     return *this;
 }
 
-template <class T> inline void JSRetainPtr<T>::swap(JSRetainPtr<T>& o)
+template<typename T> inline void JSRetainPtr<T>::swap(JSRetainPtr<T>& o)
 {
     std::swap(m_ptr, o.m_ptr);
 }
 
-template <class T> inline void swap(JSRetainPtr<T>& a, JSRetainPtr<T>& b)
+template<typename T> inline void swap(JSRetainPtr<T>& a, JSRetainPtr<T>& b)
 {
     a.swap(b);
 }
 
-template <typename T, typename U> inline bool operator==(const JSRetainPtr<T>& a, const JSRetainPtr<U>& b)
+template<typename T, typename U> inline bool operator==(const JSRetainPtr<T>& a, const JSRetainPtr<U>& b)
 { 
     return a.get() == b.get(); 
 }
 
-template <typename T, typename U> inline bool operator==(const JSRetainPtr<T>& a, U* b)
+template<typename T, typename U> inline bool operator==(const JSRetainPtr<T>& a, U* b)
 { 
     return a.get() == b; 
 }
 
-template <typename T, typename U> inline bool operator==(T* a, const JSRetainPtr<U>& b) 
+template<typename T, typename U> inline bool operator==(T* a, const JSRetainPtr<U>& b) 
 {
     return a == b.get(); 
 }
 
-template <typename T, typename U> inline bool operator!=(const JSRetainPtr<T>& a, const JSRetainPtr<U>& b)
+template<typename T, typename U> inline bool operator!=(const JSRetainPtr<T>& a, const JSRetainPtr<U>& b)
 { 
     return a.get() != b.get(); 
 }
 
-template <typename T, typename U> inline bool operator!=(const JSRetainPtr<T>& a, U* b)
+template<typename T, typename U> inline bool operator!=(const JSRetainPtr<T>& a, U* b)
 {
     return a.get() != b; 
 }
 
-template <typename T, typename U> inline bool operator!=(T* a, const JSRetainPtr<U>& b)
+template<typename T, typename U> inline bool operator!=(T* a, const JSRetainPtr<U>& b)
 { 
     return a != b.get(); 
 }
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 8268a43..e788546 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,32 @@
+2010-08-10  Darin Adler  <darin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add leakRef and clear to all RefPtr variants
+        https://bugs.webkit.org/show_bug.cgi?id=42389
+
+        * API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do
+        "template<...>". We should probably put this in the style guide and do it
+        consitently. Fixed other minor style issues. Defined many of the inlined
+        functions outside the class definition, to avoid style checker warnings
+        about multiple statements on a single line and for slightly better clarity
+        of the class definition itself. Renamed releaseRef to leakRef. Added a
+        releaseRef that calls leakRef so we don't have to rename all callers oat
+        once. Added a clear function.
+
+        * wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef.
+
+        * 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.
+
+        * wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do
+        "template<...>". Defined many of the inlined functions outside the class
+        definition, to avoid style checker warnings about multiple statements on
+        a single line and for slightly better clarity of the class definition itself.
+        Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
+        don't have to rename all callers at once. Added a clear function.
+
 2010-08-10  Dumitru Daniliuc  <dumi at chromium.org>
 
         Unreviewed, reverting an unintentional change to a file submitted in r65108.
diff --git a/JavaScriptCore/wtf/PassRefPtr.h b/JavaScriptCore/wtf/PassRefPtr.h
index 54fa14c..b43c5ba 100644
--- a/JavaScriptCore/wtf/PassRefPtr.h
+++ b/JavaScriptCore/wtf/PassRefPtr.h
@@ -67,8 +67,8 @@ namespace WTF {
         // It somewhat breaks the type system to allow transfer of ownership out of
         // a const PassRefPtr. However, it makes it much easier to work with PassRefPtr
         // temporaries, and we don't have a need to use real const PassRefPtrs anyway.
-        PassRefPtr(const PassRefPtr& o) : m_ptr(o.releaseRef()) { }
-        template<typename U> PassRefPtr(const PassRefPtr<U>& o) : m_ptr(o.releaseRef()) { }
+        PassRefPtr(const PassRefPtr& o) : m_ptr(o.leakRef()) { }
+        template<typename U> PassRefPtr(const PassRefPtr<U>& o) : m_ptr(o.leakRef()) { }
 
         ALWAYS_INLINE ~PassRefPtr() { derefIfNotNull(m_ptr); }
 
@@ -106,7 +106,7 @@ namespace WTF {
     };
     
     // NonNullPassRefPtr: Optimized for passing non-null pointers. A NonNullPassRefPtr
-    // begins life non-null, and can only become null through a call to releaseRef()
+    // begins life non-null, and can only become null through a call to leakRef()
     // or clear().
 
     // FIXME: NonNullPassRefPtr could just inherit from PassRefPtr. However,
@@ -130,19 +130,19 @@ namespace WTF {
         }
 
         NonNullPassRefPtr(const NonNullPassRefPtr& o)
-            : m_ptr(o.releaseRef())
+            : m_ptr(o.leakRef())
         {
             ASSERT(m_ptr);
         }
 
         template<typename U> NonNullPassRefPtr(const NonNullPassRefPtr<U>& o)
-            : m_ptr(o.releaseRef())
+            : m_ptr(o.leakRef())
         {
             ASSERT(m_ptr);
         }
 
         template<typename U> NonNullPassRefPtr(const PassRefPtr<U>& o)
-            : m_ptr(o.releaseRef())
+            : m_ptr(o.leakRef())
         {
             ASSERT(m_ptr);
         }
@@ -207,7 +207,7 @@ namespace WTF {
     template<typename T> inline PassRefPtr<T>& PassRefPtr<T>::operator=(const PassRefPtr<T>& ref)
     {
         T* ptr = m_ptr;
-        m_ptr = ref.releaseRef();
+        m_ptr = ref.leakRef();
         derefIfNotNull(ptr);
         return *this;
     }
@@ -215,7 +215,7 @@ namespace WTF {
     template<typename T> template<typename U> inline PassRefPtr<T>& PassRefPtr<T>::operator=(const PassRefPtr<U>& ref)
     {
         T* ptr = m_ptr;
-        m_ptr = ref.releaseRef();
+        m_ptr = ref.leakRef();
         derefIfNotNull(ptr);
         return *this;
     }
@@ -278,12 +278,12 @@ namespace WTF {
 
     template<typename T, typename U> inline PassRefPtr<T> static_pointer_cast(const PassRefPtr<U>& p) 
     { 
-        return adoptRef(static_cast<T*>(p.releaseRef())); 
+        return adoptRef(static_cast<T*>(p.leakRef())); 
     }
 
     template<typename T, typename U> inline PassRefPtr<T> const_pointer_cast(const PassRefPtr<U>& p) 
     { 
-        return adoptRef(const_cast<T*>(p.releaseRef())); 
+        return adoptRef(const_cast<T*>(p.leakRef())); 
     }
 
     template<typename T> inline T* getPtr(const PassRefPtr<T>& p)
diff --git a/JavaScriptCore/wtf/RefPtr.h b/JavaScriptCore/wtf/RefPtr.h
index f0c3091..8bd1ac3 100644
--- a/JavaScriptCore/wtf/RefPtr.h
+++ b/JavaScriptCore/wtf/RefPtr.h
@@ -32,19 +32,21 @@ namespace WTF {
 
     enum PlacementNewAdoptType { PlacementNewAdopt };
 
-    template <typename T> class PassRefPtr;
-    template <typename T> class NonNullPassRefPtr;
+    template<typename T> class PassRefPtr;
+    template<typename T> class NonNullPassRefPtr;
 
     enum HashTableDeletedValueType { HashTableDeletedValue };
 
-    template <typename T> class RefPtr : public FastAllocBase {
+    template<typename T> class RefPtr : public FastAllocBase {
     public:
         ALWAYS_INLINE RefPtr() : m_ptr(0) { }
         ALWAYS_INLINE RefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
-        ALWAYS_INLINE RefPtr(const RefPtr& o) : m_ptr(o.m_ptr) { T* ptr = m_ptr; refIfNotNull(ptr); }
-        // see comment in PassRefPtr.h for why this takes const reference
-        template <typename U> RefPtr(const PassRefPtr<U>&);
-        template <typename U> RefPtr(const NonNullPassRefPtr<U>&);
+        ALWAYS_INLINE RefPtr(const RefPtr& o) : m_ptr(o.m_ptr) { refIfNotNull(m_ptr); }
+        template<typename U> RefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { refIfNotNull(m_ptr); }
+
+        // See comments in PassRefPtr.h for an explanation of why these takes const references.
+        template<typename U> RefPtr(const PassRefPtr<U>&);
+        template<typename U> RefPtr(const NonNullPassRefPtr<U>&);
 
         // Special constructor for cases where we overwrite an object in place.
         ALWAYS_INLINE RefPtr(PlacementNewAdoptType) { }
@@ -54,9 +56,7 @@ namespace WTF {
         bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); }
 
         ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); }
-        
-        template <typename U> RefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { T* ptr = m_ptr; refIfNotNull(ptr); }
-        
+
         T* get() const { return m_ptr; }
         
         void clear();
@@ -75,9 +75,9 @@ namespace WTF {
         RefPtr& operator=(T*);
         RefPtr& operator=(const PassRefPtr<T>&);
         RefPtr& operator=(const NonNullPassRefPtr<T>&);
-        template <typename U> RefPtr& operator=(const RefPtr<U>&);
-        template <typename U> RefPtr& operator=(const PassRefPtr<U>&);
-        template <typename U> RefPtr& operator=(const NonNullPassRefPtr<U>&);
+        template<typename U> RefPtr& operator=(const RefPtr<U>&);
+        template<typename U> RefPtr& operator=(const PassRefPtr<U>&);
+        template<typename U> RefPtr& operator=(const NonNullPassRefPtr<U>&);
 
         void swap(RefPtr&);
 
@@ -87,24 +87,24 @@ namespace WTF {
         T* m_ptr;
     };
     
-    template <typename T> template <typename U> inline RefPtr<T>::RefPtr(const PassRefPtr<U>& o)
-        : m_ptr(o.releaseRef())
+    template<typename T> template<typename U> inline RefPtr<T>::RefPtr(const PassRefPtr<U>& o)
+        : m_ptr(o.leakRef())
     {
     }
 
-    template <typename T> template <typename U> inline RefPtr<T>::RefPtr(const NonNullPassRefPtr<U>& o)
-        : m_ptr(o.releaseRef())
+    template<typename T> template<typename U> inline RefPtr<T>::RefPtr(const NonNullPassRefPtr<U>& o)
+        : m_ptr(o.leakRef())
     {
     }
 
-    template <typename T> inline void RefPtr<T>::clear()
+    template<typename T> inline void RefPtr<T>::clear()
     {
         T* ptr = m_ptr;
         m_ptr = 0;
         derefIfNotNull(ptr);
     }
 
-    template <typename T> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<T>& o)
+    template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<T>& o)
     {
         T* optr = o.get();
         refIfNotNull(optr);
@@ -114,7 +114,7 @@ namespace WTF {
         return *this;
     }
     
-    template <typename T> template <typename U> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<U>& o)
+    template<typename T> template<typename U> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<U>& o)
     {
         T* optr = o.get();
         refIfNotNull(optr);
@@ -124,7 +124,7 @@ namespace WTF {
         return *this;
     }
     
-    template <typename T> inline RefPtr<T>& RefPtr<T>::operator=(T* optr)
+    template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(T* optr)
     {
         refIfNotNull(optr);
         T* ptr = m_ptr;
@@ -133,89 +133,89 @@ namespace WTF {
         return *this;
     }
 
-    template <typename T> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<T>& o)
+    template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<T>& o)
     {
         T* ptr = m_ptr;
-        m_ptr = o.releaseRef();
+        m_ptr = o.leakRef();
         derefIfNotNull(ptr);
         return *this;
     }
 
-    template <typename T> inline RefPtr<T>& RefPtr<T>::operator=(const NonNullPassRefPtr<T>& o)
+    template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(const NonNullPassRefPtr<T>& o)
     {
         T* ptr = m_ptr;
-        m_ptr = o.releaseRef();
+        m_ptr = o.leakRef();
         derefIfNotNull(ptr);
         return *this;
     }
 
-    template <typename T> template <typename U> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<U>& o)
+    template<typename T> template<typename U> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<U>& o)
     {
         T* ptr = m_ptr;
-        m_ptr = o.releaseRef();
+        m_ptr = o.leakRef();
         derefIfNotNull(ptr);
         return *this;
     }
 
-    template <typename T> template <typename U> inline RefPtr<T>& RefPtr<T>::operator=(const NonNullPassRefPtr<U>& o)
+    template<typename T> template<typename U> inline RefPtr<T>& RefPtr<T>::operator=(const NonNullPassRefPtr<U>& o)
     {
         T* ptr = m_ptr;
-        m_ptr = o.releaseRef();
+        m_ptr = o.leakRef();
         derefIfNotNull(ptr);
         return *this;
     }
 
-    template <class T> inline void RefPtr<T>::swap(RefPtr<T>& o)
+    template<class T> inline void RefPtr<T>::swap(RefPtr<T>& o)
     {
         std::swap(m_ptr, o.m_ptr);
     }
 
-    template <class T> inline void swap(RefPtr<T>& a, RefPtr<T>& b)
+    template<class T> inline void swap(RefPtr<T>& a, RefPtr<T>& b)
     {
         a.swap(b);
     }
 
-    template <typename T, typename U> inline bool operator==(const RefPtr<T>& a, const RefPtr<U>& b)
+    template<typename T, typename U> inline bool operator==(const RefPtr<T>& a, const RefPtr<U>& b)
     { 
         return a.get() == b.get(); 
     }
 
-    template <typename T, typename U> inline bool operator==(const RefPtr<T>& a, U* b)
+    template<typename T, typename U> inline bool operator==(const RefPtr<T>& a, U* b)
     { 
         return a.get() == b; 
     }
     
-    template <typename T, typename U> inline bool operator==(T* a, const RefPtr<U>& b) 
+    template<typename T, typename U> inline bool operator==(T* a, const RefPtr<U>& b) 
     {
         return a == b.get(); 
     }
     
-    template <typename T, typename U> inline bool operator!=(const RefPtr<T>& a, const RefPtr<U>& b)
+    template<typename T, typename U> inline bool operator!=(const RefPtr<T>& a, const RefPtr<U>& b)
     { 
         return a.get() != b.get(); 
     }
 
-    template <typename T, typename U> inline bool operator!=(const RefPtr<T>& a, U* b)
+    template<typename T, typename U> inline bool operator!=(const RefPtr<T>& a, U* b)
     {
         return a.get() != b; 
     }
 
-    template <typename T, typename U> inline bool operator!=(T* a, const RefPtr<U>& b)
+    template<typename T, typename U> inline bool operator!=(T* a, const RefPtr<U>& b)
     { 
         return a != b.get(); 
     }
     
-    template <typename T, typename U> inline RefPtr<T> static_pointer_cast(const RefPtr<U>& p)
+    template<typename T, typename U> inline RefPtr<T> static_pointer_cast(const RefPtr<U>& p)
     { 
         return RefPtr<T>(static_cast<T*>(p.get())); 
     }
 
-    template <typename T, typename U> inline RefPtr<T> const_pointer_cast(const RefPtr<U>& p)
+    template<typename T, typename U> inline RefPtr<T> const_pointer_cast(const RefPtr<U>& p)
     { 
         return RefPtr<T>(const_cast<T*>(p.get())); 
     }
 
-    template <typename T> inline T* getPtr(const RefPtr<T>& p)
+    template<typename T> inline T* getPtr(const RefPtr<T>& p)
     {
         return p.get();
     }
diff --git a/JavaScriptCore/wtf/RetainPtr.h b/JavaScriptCore/wtf/RetainPtr.h
index f5a027e..68b5a04 100644
--- a/JavaScriptCore/wtf/RetainPtr.h
+++ b/JavaScriptCore/wtf/RetainPtr.h
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ *  Copyright (C) 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
@@ -48,7 +48,7 @@ namespace WTF {
     }
 #endif
 
-    template <typename T> class RetainPtr {
+    template<typename T> class RetainPtr {
     public:
         typedef typename RemovePointer<T>::Type ValueType;
         typedef ValueType* PtrType;
@@ -67,12 +67,13 @@ namespace WTF {
         
         ~RetainPtr() { if (PtrType ptr = m_ptr) CFRelease(ptr); }
         
-        template <typename U> RetainPtr(const RetainPtr<U>& o) : m_ptr(o.get()) { if (PtrType ptr = m_ptr) CFRetain(ptr); }
+        template<typename U> RetainPtr(const RetainPtr<U>&);
         
         PtrType get() const { return m_ptr; }
-        
-        PtrType releaseRef() { PtrType tmp = m_ptr; m_ptr = 0; return tmp; }
-        
+
+        void clear();
+        PtrType leakRef() WARN_UNUSED_RETURN;
+
         PtrType operator->() const { return m_ptr; }
         
         bool operator!() const { return !m_ptr; }
@@ -82,22 +83,47 @@ namespace WTF {
         operator UnspecifiedBoolType() const { return m_ptr ? &RetainPtr::m_ptr : 0; }
         
         RetainPtr& operator=(const RetainPtr&);
-        template <typename U> RetainPtr& operator=(const RetainPtr<U>&);
+        template<typename U> RetainPtr& operator=(const RetainPtr<U>&);
         RetainPtr& operator=(PtrType);
-        template <typename U> RetainPtr& operator=(U*);
+        template<typename U> RetainPtr& operator=(U*);
 
         void adoptCF(PtrType);
         void adoptNS(PtrType);
         
         void swap(RetainPtr&);
 
+        // FIXME: Remove releaseRef once we change all callers to call leakRef instead.
+        PtrType releaseRef() { return leakRef(); }
+
     private:
         static T* hashTableDeletedValue() { return reinterpret_cast<T*>(-1); }
 
         PtrType m_ptr;
     };
     
-    template <typename T> inline RetainPtr<T>& RetainPtr<T>::operator=(const RetainPtr<T>& o)
+    template<typename T> template<typename U> inline RetainPtr<T>::RetainPtr(const RetainPtr<U>& o)
+        : m_ptr(o.get())
+    {
+        if (PtrType ptr = m_ptr)
+            CFRetain(ptr);
+    }
+
+    template<typename T> inline void RetainPtr<T>::clear()
+    {
+        if (PtrType ptr = m_ptr) {
+            m_ptr = 0;
+            CFRelease(ptr);
+        }
+    }
+
+    template<typename T> inline typename RetainPtr<T>::PtrType RetainPtr<T>::leakRef()
+    {
+        PtrType ptr = m_ptr;
+        m_ptr = 0;
+        return ptr;
+    }
+
+    template<typename T> inline RetainPtr<T>& RetainPtr<T>::operator=(const RetainPtr<T>& o)
     {
         PtrType optr = o.get();
         if (optr)
@@ -109,7 +135,7 @@ namespace WTF {
         return *this;
     }
     
-    template <typename T> template <typename U> inline RetainPtr<T>& RetainPtr<T>::operator=(const RetainPtr<U>& o)
+    template<typename T> template<typename U> inline RetainPtr<T>& RetainPtr<T>::operator=(const RetainPtr<U>& o)
     {
         PtrType optr = o.get();
         if (optr)
@@ -121,7 +147,7 @@ namespace WTF {
         return *this;
     }
     
-    template <typename T> inline RetainPtr<T>& RetainPtr<T>::operator=(PtrType optr)
+    template<typename T> inline RetainPtr<T>& RetainPtr<T>::operator=(PtrType optr)
     {
         if (optr)
             CFRetain(optr);
@@ -132,7 +158,7 @@ namespace WTF {
         return *this;
     }
 
-    template <typename T> inline void RetainPtr<T>::adoptCF(PtrType optr)
+    template<typename T> inline void RetainPtr<T>::adoptCF(PtrType optr)
     {
         PtrType ptr = m_ptr;
         m_ptr = optr;
@@ -140,7 +166,7 @@ namespace WTF {
             CFRelease(ptr);
     }
 
-    template <typename T> inline void RetainPtr<T>::adoptNS(PtrType optr)
+    template<typename T> inline void RetainPtr<T>::adoptNS(PtrType optr)
     {
         adoptNSReference(optr);
         
@@ -150,7 +176,7 @@ namespace WTF {
             CFRelease(ptr);
     }
     
-    template <typename T> template <typename U> inline RetainPtr<T>& RetainPtr<T>::operator=(U* optr)
+    template<typename T> template<typename U> inline RetainPtr<T>& RetainPtr<T>::operator=(U* optr)
     {
         if (optr)
             CFRetain(optr);
@@ -161,42 +187,42 @@ namespace WTF {
         return *this;
     }
 
-    template <class T> inline void RetainPtr<T>::swap(RetainPtr<T>& o)
+    template<typename T> inline void RetainPtr<T>::swap(RetainPtr<T>& o)
     {
         std::swap(m_ptr, o.m_ptr);
     }
 
-    template <class T> inline void swap(RetainPtr<T>& a, RetainPtr<T>& b)
+    template<typename T> inline void swap(RetainPtr<T>& a, RetainPtr<T>& b)
     {
         a.swap(b);
     }
 
-    template <typename T, typename U> inline bool operator==(const RetainPtr<T>& a, const RetainPtr<U>& b)
+    template<typename T, typename U> inline bool operator==(const RetainPtr<T>& a, const RetainPtr<U>& b)
     { 
         return a.get() == b.get(); 
     }
 
-    template <typename T, typename U> inline bool operator==(const RetainPtr<T>& a, U* b)
+    template<typename T, typename U> inline bool operator==(const RetainPtr<T>& a, U* b)
     { 
         return a.get() == b; 
     }
     
-    template <typename T, typename U> inline bool operator==(T* a, const RetainPtr<U>& b) 
+    template<typename T, typename U> inline bool operator==(T* a, const RetainPtr<U>& b) 
     {
         return a == b.get(); 
     }
     
-    template <typename T, typename U> inline bool operator!=(const RetainPtr<T>& a, const RetainPtr<U>& b)
+    template<typename T, typename U> inline bool operator!=(const RetainPtr<T>& a, const RetainPtr<U>& b)
     { 
         return a.get() != b.get(); 
     }
 
-    template <typename T, typename U> inline bool operator!=(const RetainPtr<T>& a, U* b)
+    template<typename T, typename U> inline bool operator!=(const RetainPtr<T>& a, U* b)
     {
         return a.get() != b; 
     }
 
-    template <typename T, typename U> inline bool operator!=(T* a, const RetainPtr<U>& b)
+    template<typename T, typename U> inline bool operator!=(T* a, const RetainPtr<U>& b)
     { 
         return a != b.get(); 
     }
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f0d7393..05427d5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-10  Darin Adler  <darin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add leakRef and clear to all RefPtr variants
+        https://bugs.webkit.org/show_bug.cgi?id=42389
+
+        * platform/win/COMPtr.h: Changed all uses of "template <...>" to instead do
+        "template<...>". Defined many of the inlined functions outside the class
+        definition, to avoid style checker warnings about multiple statements on
+        a single line and for slightly better clarity of the class definition itself.
+        Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
+        don't have to rename all callers at once. Added a clear function. Changed
+        the hash table code so it doesn't need to call releaseRef, and so it uses
+        the hash table deleted value hooks already present within the class.
+
 2010-08-10  Ariya Hidayat  <ariya at sencha.com>
 
         [Qt] Fix build warning: remove reference to html/BlobRegistryImp.h
diff --git a/WebCore/platform/win/COMPtr.h b/WebCore/platform/win/COMPtr.h
index 692706f..29c8335 100644
--- a/WebCore/platform/win/COMPtr.h
+++ b/WebCore/platform/win/COMPtr.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2010 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ enum AdoptCOMTag { AdoptCOM };
 enum QueryTag { Query };
 enum CreateTag { Create };
 
-template <typename T> class COMPtr {
+template<typename T> class COMPtr {
 public:
     COMPtr() : m_ptr(0) { }
     COMPtr(T* ptr) : m_ptr(ptr) { if (m_ptr) m_ptr->AddRef(); }
@@ -52,7 +52,7 @@ public:
     COMPtr(const COMPtr& o) : m_ptr(o.m_ptr) { if (T* ptr = m_ptr) ptr->AddRef(); }
 
     COMPtr(QueryTag, IUnknown* ptr) : m_ptr(copyQueryInterfaceRef(ptr)) { }
-    template <typename U> COMPtr(QueryTag, const COMPtr<U>& ptr) : m_ptr(copyQueryInterfaceRef(ptr.get())) { }
+    template<typename U> COMPtr(QueryTag, const COMPtr<U>& ptr) : m_ptr(copyQueryInterfaceRef(ptr.get())) { }
 
     COMPtr(CreateTag, const IID& clsid) : m_ptr(createInstance(clsid)) { }
 
@@ -63,7 +63,9 @@ public:
     ~COMPtr() { if (m_ptr) m_ptr->Release(); }
 
     T* get() const { return m_ptr; }
-    T* releaseRef() { T* tmp = m_ptr; m_ptr = 0; return tmp; }
+
+    void clear();
+    T* leakRef();
 
     T& operator*() const { return *m_ptr; }
     T* operator->() const { return m_ptr; }
@@ -78,16 +80,19 @@ public:
 
     COMPtr& operator=(const COMPtr&);
     COMPtr& operator=(T*);
-    template <typename U> COMPtr& operator=(const COMPtr<U>&);
+    template<typename U> COMPtr& operator=(const COMPtr<U>&);
 
     void query(IUnknown* ptr) { adoptRef(copyQueryInterfaceRef(ptr)); }
-    template <typename U> void query(const COMPtr<U>& ptr) { query(ptr.get()); }
+    template<typename U> void query(const COMPtr<U>& ptr) { query(ptr.get()); }
 
     void create(const IID& clsid) { adoptRef(createInstance(clsid)); }
 
-    template <typename U> HRESULT copyRefTo(U**);
+    template<typename U> HRESULT copyRefTo(U**);
     void adoptRef(T*);
 
+    // FIXME: Remove releaseRef once we change all callers to call leakRef instead.
+    T* releaseRef() { return leakRef(); }
+
 private:
     static T* copyQueryInterfaceRef(IUnknown*);
     static T* createInstance(const IID& clsid);
@@ -96,7 +101,22 @@ private:
     T* m_ptr;
 };
 
-template <typename T> inline T* COMPtr<T>::createInstance(const IID& clsid)
+template<typename T> inline void COMPtr<T>::clear()
+{
+    if (T* ptr = m_ptr) {
+        m_ptr = 0;
+        ptr->Release();
+    }
+}
+
+template<typename T> inline T* COMPtr<T>::leakRef()
+{
+    T* ptr = m_ptr;
+    m_ptr = 0;
+    return ptr;
+}
+
+template<typename T> inline T* COMPtr<T>::createInstance(const IID& clsid)
 {
     T* result;
     if (FAILED(CoCreateInstance(clsid, 0, CLSCTX_ALL, __uuidof(result), reinterpret_cast<void**>(&result))))
@@ -104,7 +124,7 @@ template <typename T> inline T* COMPtr<T>::createInstance(const IID& clsid)
     return result;
 }
 
-template <typename T> inline T* COMPtr<T>::copyQueryInterfaceRef(IUnknown* ptr)
+template<typename T> inline T* COMPtr<T>::copyQueryInterfaceRef(IUnknown* ptr)
 {
     if (!ptr)
         return 0;
@@ -114,7 +134,7 @@ template <typename T> inline T* COMPtr<T>::copyQueryInterfaceRef(IUnknown* ptr)
     return result;
 }
 
-template <typename T> template <typename U> inline HRESULT COMPtr<T>::copyRefTo(U** ptr)
+template<typename T> template<typename U> inline HRESULT COMPtr<T>::copyRefTo(U** ptr)
 {
     if (!ptr)
         return E_POINTER;
@@ -124,14 +144,14 @@ template <typename T> template <typename U> inline HRESULT COMPtr<T>::copyRefTo(
     return S_OK;
 }
 
-template <typename T> inline void COMPtr<T>::adoptRef(T *ptr)
+template<typename T> inline void COMPtr<T>::adoptRef(T *ptr)
 {
     if (m_ptr)
         m_ptr->Release();
     m_ptr = ptr;
 }
 
-template <typename T> inline COMPtr<T>& COMPtr<T>::operator=(const COMPtr<T>& o)
+template<typename T> inline COMPtr<T>& COMPtr<T>::operator=(const COMPtr<T>& o)
 {
     T* optr = o.get();
     if (optr)
@@ -143,7 +163,7 @@ template <typename T> inline COMPtr<T>& COMPtr<T>::operator=(const COMPtr<T>& o)
     return *this;
 }
 
-template <typename T> template <typename U> inline COMPtr<T>& COMPtr<T>::operator=(const COMPtr<U>& o)
+template<typename T> template<typename U> inline COMPtr<T>& COMPtr<T>::operator=(const COMPtr<U>& o)
 {
     T* optr = o.get();
     if (optr)
@@ -155,7 +175,7 @@ template <typename T> template <typename U> inline COMPtr<T>& COMPtr<T>::operato
     return *this;
 }
 
-template <typename T> inline COMPtr<T>& COMPtr<T>::operator=(T* optr)
+template<typename T> inline COMPtr<T>& COMPtr<T>::operator=(T* optr)
 {
     if (optr)
         optr->AddRef();
@@ -166,32 +186,32 @@ template <typename T> inline COMPtr<T>& COMPtr<T>::operator=(T* optr)
     return *this;
 }
 
-template <typename T, typename U> inline bool operator==(const COMPtr<T>& a, const COMPtr<U>& b)
+template<typename T, typename U> inline bool operator==(const COMPtr<T>& a, const COMPtr<U>& b)
 {
     return a.get() == b.get();
 }
 
-template <typename T, typename U> inline bool operator==(const COMPtr<T>& a, U* b)
+template<typename T, typename U> inline bool operator==(const COMPtr<T>& a, U* b)
 {
     return a.get() == b;
 }
 
-template <typename T, typename U> inline bool operator==(T* a, const COMPtr<U>& b) 
+template<typename T, typename U> inline bool operator==(T* a, const COMPtr<U>& b) 
 {
     return a == b.get();
 }
 
-template <typename T, typename U> inline bool operator!=(const COMPtr<T>& a, const COMPtr<U>& b)
+template<typename T, typename U> inline bool operator!=(const COMPtr<T>& a, const COMPtr<U>& b)
 {
     return a.get() != b.get();
 }
 
-template <typename T, typename U> inline bool operator!=(const COMPtr<T>& a, U* b)
+template<typename T, typename U> inline bool operator!=(const COMPtr<T>& a, U* b)
 {
     return a.get() != b;
 }
 
-template <typename T, typename U> inline bool operator!=(T* a, const COMPtr<U>& b)
+template<typename T, typename U> inline bool operator!=(T* a, const COMPtr<U>& b)
 {
     return a != b.get();
 }
@@ -200,8 +220,8 @@ namespace WTF {
 
     template<typename P> struct HashTraits<COMPtr<P> > : GenericHashTraits<COMPtr<P> > {
         static const bool emptyValueIsZero = true;
-        static void constructDeletedValue(COMPtr<P>& slot) { slot.releaseRef(); *&slot = reinterpret_cast<P*>(-1); }
-        static bool isDeletedValue(const COMPtr<P>& value) { return value == reinterpret_cast<P*>(-1); }
+        static void constructDeletedValue(COMPtr<P>& slot) { new (&slot) COMPtr<P>(HashTableDeletedValueType); }
+        static bool isDeletedValue(const COMPtr<P>& value) { return value.isHashTableDeletedValue(); }
     };
 
     template<typename P> struct PtrHash<COMPtr<P> > : PtrHash<P*> {
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 209ae1f..4ba3363 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-10  Darin Adler  <darin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add leakRef and clear to all RefPtr variants
+        https://bugs.webkit.org/show_bug.cgi?id=42389
+
+        * UIProcess/API/cpp/WKRetainPtr.h: Changed all uses of "template <...>" to
+        "template<...>". Defined many of the inlined functions outside the class
+        definition, to avoid style checker warnings about multiple statements on
+        a single line and for slightly better clarity of the class definition itself.
+        Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
+        don't have to rename all callers at once. Added a clear function.
+
 2010-08-10  Balazs Kelemen  <kb at inf.u-szeged.hu>
 
         Reviewed by Antonio Gomes.
diff --git a/WebKit2/UIProcess/API/cpp/WKRetainPtr.h b/WebKit2/UIProcess/API/cpp/WKRetainPtr.h
index e9322a7..5616f8d 100644
--- a/WebKit2/UIProcess/API/cpp/WKRetainPtr.h
+++ b/WebKit2/UIProcess/API/cpp/WKRetainPtr.h
@@ -82,6 +82,7 @@ public:
         if (ptr)
             WKRelease(ptr);
     }
+
     PtrType leakRef()
     {
         PtrType ptr = m_ptr;
@@ -97,9 +98,9 @@ public:
     operator UnspecifiedBoolType() const { return m_ptr ? &WKRetainPtr::m_ptr : 0; }
 
     WKRetainPtr& operator=(const WKRetainPtr&);
-    template <typename U> WKRetainPtr& operator=(const WKRetainPtr<U>&);
+    template<typename U> WKRetainPtr& operator=(const WKRetainPtr<U>&);
     WKRetainPtr& operator=(PtrType);
-    template <typename U> WKRetainPtr& operator=(U*);
+    template<typename U> WKRetainPtr& operator=(U*);
 
     void adopt(PtrType);
     void swap(WKRetainPtr&);
@@ -111,7 +112,7 @@ private:
     PtrType m_ptr;
 };
 
-template <typename T> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(const WKRetainPtr<T>& o)
+template<typename T> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(const WKRetainPtr<T>& o)
 {
     PtrType optr = o.get();
     if (optr)
@@ -123,7 +124,7 @@ template <typename T> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(const WKR
     return *this;
 }
 
-template <typename T> template <typename U> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(const WKRetainPtr<U>& o)
+template<typename T> template<typename U> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(const WKRetainPtr<U>& o)
 {
     PtrType optr = o.get();
     if (optr)
@@ -135,7 +136,7 @@ template <typename T> template <typename U> inline WKRetainPtr<T>& WKRetainPtr<T
     return *this;
 }
 
-template <typename T> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(PtrType optr)
+template<typename T> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(PtrType optr)
 {
     if (optr)
         WKRetain(optr);
@@ -146,7 +147,7 @@ template <typename T> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(PtrType o
     return *this;
 }
 
-template <typename T> inline void WKRetainPtr<T>::adopt(PtrType optr)
+template<typename T> inline void WKRetainPtr<T>::adopt(PtrType optr)
 {
     PtrType ptr = m_ptr;
     m_ptr = optr;
@@ -154,7 +155,7 @@ template <typename T> inline void WKRetainPtr<T>::adopt(PtrType optr)
         WKRelease(ptr);
 }
 
-template <typename T> template <typename U> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(U* optr)
+template<typename T> template<typename U> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(U* optr)
 {
     if (optr)
         WKRetain(optr);
@@ -165,42 +166,42 @@ template <typename T> template <typename U> inline WKRetainPtr<T>& WKRetainPtr<T
     return *this;
 }
 
-template <class T> inline void WKRetainPtr<T>::swap(WKRetainPtr<T>& o)
+template<typename T> inline void WKRetainPtr<T>::swap(WKRetainPtr<T>& o)
 {
     std::swap(m_ptr, o.m_ptr);
 }
 
-template <class T> inline void swap(WKRetainPtr<T>& a, WKRetainPtr<T>& b)
+template<typename T> inline void swap(WKRetainPtr<T>& a, WKRetainPtr<T>& b)
 {
     a.swap(b);
 }
 
-template <typename T, typename U> inline bool operator==(const WKRetainPtr<T>& a, const WKRetainPtr<U>& b)
+template<typename T, typename U> inline bool operator==(const WKRetainPtr<T>& a, const WKRetainPtr<U>& b)
 { 
     return a.get() == b.get(); 
 }
 
-template <typename T, typename U> inline bool operator==(const WKRetainPtr<T>& a, U* b)
+template<typename T, typename U> inline bool operator==(const WKRetainPtr<T>& a, U* b)
 { 
     return a.get() == b; 
 }
 
-template <typename T, typename U> inline bool operator==(T* a, const WKRetainPtr<U>& b) 
+template<typename T, typename U> inline bool operator==(T* a, const WKRetainPtr<U>& b) 
 {
     return a == b.get(); 
 }
 
-template <typename T, typename U> inline bool operator!=(const WKRetainPtr<T>& a, const WKRetainPtr<U>& b)
+template<typename T, typename U> inline bool operator!=(const WKRetainPtr<T>& a, const WKRetainPtr<U>& b)
 { 
     return a.get() != b.get(); 
 }
 
-template <typename T, typename U> inline bool operator!=(const WKRetainPtr<T>& a, U* b)
+template<typename T, typename U> inline bool operator!=(const WKRetainPtr<T>& a, U* b)
 {
     return a.get() != b; 
 }
 
-template <typename T, typename U> inline bool operator!=(T* a, const WKRetainPtr<U>& b)
+template<typename T, typename U> inline bool operator!=(T* a, const WKRetainPtr<U>& b)
 { 
     return a != b.get(); 
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list