<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[177696] trunk/Source/WTF</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/177696">177696</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-12-23 14:16:46 -0800 (Tue, 23 Dec 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Re-indent RefPtr.h and RetainPtr.h.

Rubber-stamped by Sam Weinig.

* wtf/RefPtr.h:
* wtf/RetainPtr.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfRefPtrh">trunk/Source/WTF/wtf/RefPtr.h</a></li>
<li><a href="#trunkSourceWTFwtfRetainPtrh">trunk/Source/WTF/wtf/RetainPtr.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (177695 => 177696)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2014-12-23 22:14:48 UTC (rev 177695)
+++ trunk/Source/WTF/ChangeLog        2014-12-23 22:16:46 UTC (rev 177696)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2014-12-23  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Re-indent RefPtr.h and RetainPtr.h.
+
+        Rubber-stamped by Sam Weinig.
+
+        * wtf/RefPtr.h:
+        * wtf/RetainPtr.h:
+
</ins><span class="cx"> 2014-12-20  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] add optimized fullscreen API
</span></span></pre></div>
<a id="trunkSourceWTFwtfRefPtrh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RefPtr.h (177695 => 177696)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RefPtr.h        2014-12-23 22:14:48 UTC (rev 177695)
+++ trunk/Source/WTF/wtf/RefPtr.h        2014-12-23 22:16:46 UTC (rev 177696)
</span><span class="lines">@@ -31,200 +31,200 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><del>-    enum HashTableDeletedValueType { HashTableDeletedValue };
</del><ins>+enum HashTableDeletedValueType { HashTableDeletedValue };
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; class RefPtr {
-        WTF_MAKE_FAST_ALLOCATED;
-    public:
-        typedef T ValueType;
-        typedef ValueType* PtrType;
</del><ins>+template&lt;typename T&gt; class RefPtr {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    typedef T ValueType;
+    typedef ValueType* PtrType;
</ins><span class="cx"> 
</span><del>-        ALWAYS_INLINE RefPtr() : m_ptr(nullptr) { }
-        ALWAYS_INLINE RefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
-        ALWAYS_INLINE RefPtr(const RefPtr&amp; o) : m_ptr(o.m_ptr) { refIfNotNull(m_ptr); }
-        template&lt;typename U&gt; RefPtr(const RefPtr&lt;U&gt;&amp; o) : m_ptr(o.get()) { refIfNotNull(m_ptr); }
</del><ins>+    ALWAYS_INLINE RefPtr() : m_ptr(nullptr) { }
+    ALWAYS_INLINE RefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
+    ALWAYS_INLINE RefPtr(const RefPtr&amp; o) : m_ptr(o.m_ptr) { refIfNotNull(m_ptr); }
+    template&lt;typename U&gt; RefPtr(const RefPtr&lt;U&gt;&amp; o) : m_ptr(o.get()) { refIfNotNull(m_ptr); }
</ins><span class="cx"> 
</span><del>-        ALWAYS_INLINE RefPtr(RefPtr&amp;&amp; o) : m_ptr(o.release().leakRef()) { }
-        template&lt;typename U&gt; RefPtr(RefPtr&lt;U&gt;&amp;&amp; o) : m_ptr(o.release().leakRef()) { }
</del><ins>+    ALWAYS_INLINE RefPtr(RefPtr&amp;&amp; o) : m_ptr(o.release().leakRef()) { }
+    template&lt;typename U&gt; RefPtr(RefPtr&lt;U&gt;&amp;&amp; o) : m_ptr(o.release().leakRef()) { }
</ins><span class="cx"> 
</span><del>-        // See comments in PassRefPtr.h for an explanation of why this takes a const reference.
-        template&lt;typename U&gt; RefPtr(const PassRefPtr&lt;U&gt;&amp;);
</del><ins>+    // See comments in PassRefPtr.h for an explanation of why this takes a const reference.
+    template&lt;typename U&gt; RefPtr(const PassRefPtr&lt;U&gt;&amp;);
</ins><span class="cx"> 
</span><del>-        template&lt;typename U&gt; RefPtr(Ref&lt;U&gt;&amp;&amp;);
</del><ins>+    template&lt;typename U&gt; RefPtr(Ref&lt;U&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><del>-        // Hash table deleted values, which are only constructed and never copied or destroyed.
-        RefPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { }
-        bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); }
</del><ins>+    // Hash table deleted values, which are only constructed and never copied or destroyed.
+    RefPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { }
+    bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); }
</ins><span class="cx"> 
</span><del>-        ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); }
</del><ins>+    ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); }
</ins><span class="cx"> 
</span><del>-        T* get() const { return m_ptr; }
-        
-        void clear();
-        PassRefPtr&lt;T&gt; release() { PassRefPtr&lt;T&gt; tmp = adoptRef(m_ptr); m_ptr = nullptr; return tmp; }
-        Ref&lt;T&gt; releaseNonNull() { ASSERT(m_ptr); Ref&lt;T&gt; tmp(adoptRef(*m_ptr)); m_ptr = nullptr; return tmp; }
</del><ins>+    T* get() const { return m_ptr; }
+    
+    void clear();
+    PassRefPtr&lt;T&gt; release() { PassRefPtr&lt;T&gt; tmp = adoptRef(m_ptr); m_ptr = nullptr; return tmp; }
+    Ref&lt;T&gt; releaseNonNull() { ASSERT(m_ptr); Ref&lt;T&gt; tmp(adoptRef(*m_ptr)); m_ptr = nullptr; return tmp; }
</ins><span class="cx"> 
</span><del>-        T* leakRef() WARN_UNUSED_RETURN;
</del><ins>+    T* leakRef() WARN_UNUSED_RETURN;
</ins><span class="cx"> 
</span><del>-        T&amp; operator*() const { return *m_ptr; }
-        ALWAYS_INLINE T* operator-&gt;() const { return m_ptr; }
-        
-        bool operator!() const { return !m_ptr; }
</del><ins>+    T&amp; operator*() const { return *m_ptr; }
+    ALWAYS_INLINE T* operator-&gt;() const { return m_ptr; }
</ins><span class="cx">     
</span><del>-        // This conversion operator allows implicit conversion to bool but not to other integer types.
-        typedef T* (RefPtr::*UnspecifiedBoolType);
-        operator UnspecifiedBoolType() const { return m_ptr ? &amp;RefPtr::m_ptr : nullptr; }
-        
-        RefPtr&amp; operator=(const RefPtr&amp;);
-        RefPtr&amp; operator=(T*);
-        RefPtr&amp; operator=(const PassRefPtr&lt;T&gt;&amp;);
-        template&lt;typename U&gt; RefPtr&amp; operator=(const RefPtr&lt;U&gt;&amp;);
-        template&lt;typename U&gt; RefPtr&amp; operator=(const PassRefPtr&lt;U&gt;&amp;);
-        RefPtr&amp; operator=(RefPtr&amp;&amp;);
-        template&lt;typename U&gt; RefPtr&amp; operator=(RefPtr&lt;U&gt;&amp;&amp;);
-        template&lt;typename U&gt; RefPtr&amp; operator=(Ref&lt;U&gt;&amp;&amp;);
</del><ins>+    bool operator!() const { return !m_ptr; }
</ins><span class="cx"> 
</span><del>-        void swap(RefPtr&amp;);
</del><ins>+    // This conversion operator allows implicit conversion to bool but not to other integer types.
+    typedef T* (RefPtr::*UnspecifiedBoolType);
+    operator UnspecifiedBoolType() const { return m_ptr ? &amp;RefPtr::m_ptr : nullptr; }
+    
+    RefPtr&amp; operator=(const RefPtr&amp;);
+    RefPtr&amp; operator=(T*);
+    RefPtr&amp; operator=(const PassRefPtr&lt;T&gt;&amp;);
+    template&lt;typename U&gt; RefPtr&amp; operator=(const RefPtr&lt;U&gt;&amp;);
+    template&lt;typename U&gt; RefPtr&amp; operator=(const PassRefPtr&lt;U&gt;&amp;);
+    RefPtr&amp; operator=(RefPtr&amp;&amp;);
+    template&lt;typename U&gt; RefPtr&amp; operator=(RefPtr&lt;U&gt;&amp;&amp;);
+    template&lt;typename U&gt; RefPtr&amp; operator=(Ref&lt;U&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><del>-        static T* hashTableDeletedValue() { return reinterpret_cast&lt;T*&gt;(-1); }
</del><ins>+    void swap(RefPtr&amp;);
</ins><span class="cx"> 
</span><ins>+    static T* hashTableDeletedValue() { return reinterpret_cast&lt;T*&gt;(-1); }
+
</ins><span class="cx"> #if COMPILER_SUPPORTS(CXX_REFERENCE_QUALIFIED_FUNCTIONS)
</span><del>-        RefPtr copyRef() &amp;&amp; = delete;
-        RefPtr copyRef() const &amp; WARN_UNUSED_RETURN { return RefPtr(m_ptr); }
</del><ins>+    RefPtr copyRef() &amp;&amp; = delete;
+    RefPtr copyRef() const &amp; WARN_UNUSED_RETURN { return RefPtr(m_ptr); }
</ins><span class="cx"> #else
</span><del>-        RefPtr copyRef() const WARN_UNUSED_RETURN { return RefPtr(m_ptr); }
</del><ins>+    RefPtr copyRef() const WARN_UNUSED_RETURN { return RefPtr(m_ptr); }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    private:
-        T* m_ptr;
-    };
-    
-    template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;::RefPtr(const PassRefPtr&lt;U&gt;&amp; o)
-        : m_ptr(o.leakRef())
-    {
-    }
</del><ins>+private:
+    T* m_ptr;
+};
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;::RefPtr(Ref&lt;U&gt;&amp;&amp; reference)
-        : m_ptr(&amp;reference.leakRef())
-    {
-    }
</del><ins>+template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;::RefPtr(const PassRefPtr&lt;U&gt;&amp; o)
+    : m_ptr(o.leakRef())
+{
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline void RefPtr&lt;T&gt;::clear()
-    {
-        derefIfNotNull(std::exchange(m_ptr, nullptr));
-    }
</del><ins>+template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;::RefPtr(Ref&lt;U&gt;&amp;&amp; reference)
+    : m_ptr(&amp;reference.leakRef())
+{
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt;
-    inline T* RefPtr&lt;T&gt;::leakRef()
-    {
-        return std::exchange(m_ptr, nullptr);
-    }
</del><ins>+template&lt;typename T&gt; inline void RefPtr&lt;T&gt;::clear()
+{
+    derefIfNotNull(std::exchange(m_ptr, nullptr));
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(const RefPtr&amp; o)
-    {
-        RefPtr ptr = o;
-        swap(ptr);
-        return *this;
-    }
-    
-    template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(const RefPtr&lt;U&gt;&amp; o)
-    {
-        RefPtr ptr = o;
-        swap(ptr);
-        return *this;
-    }
-    
-    template&lt;typename T&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(T* optr)
-    {
-        RefPtr ptr = optr;
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt;
+inline T* RefPtr&lt;T&gt;::leakRef()
+{
+    return std::exchange(m_ptr, nullptr);
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(const PassRefPtr&lt;T&gt;&amp; o)
-    {
-        RefPtr ptr = o;
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(const RefPtr&amp; o)
+{
+    RefPtr ptr = o;
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(const PassRefPtr&lt;U&gt;&amp; o)
-    {
-        RefPtr ptr = o;
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(const RefPtr&lt;U&gt;&amp; o)
+{
+    RefPtr ptr = o;
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(RefPtr&amp;&amp; o)
-    {
-        RefPtr ptr = WTF::move(o);
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(T* optr)
+{
+    RefPtr ptr = optr;
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(RefPtr&lt;U&gt;&amp;&amp; o)
-    {
-        RefPtr ptr = WTF::move(o);
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(const PassRefPtr&lt;T&gt;&amp; o)
+{
+    RefPtr ptr = o;
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(Ref&lt;U&gt;&amp;&amp; reference)
-    {
-        RefPtr ptr = WTF::move(reference);
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(const PassRefPtr&lt;U&gt;&amp; o)
+{
+    RefPtr ptr = o;
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;class T&gt; inline void RefPtr&lt;T&gt;::swap(RefPtr&amp; o)
-    {
-        std::swap(m_ptr, o.m_ptr);
-    }
</del><ins>+template&lt;typename T&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(RefPtr&amp;&amp; o)
+{
+    RefPtr ptr = WTF::move(o);
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;class T&gt; inline void swap(RefPtr&lt;T&gt;&amp; a, RefPtr&lt;T&gt;&amp; b)
-    {
-        a.swap(b);
-    }
</del><ins>+template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(RefPtr&lt;U&gt;&amp;&amp; o)
+{
+    RefPtr ptr = WTF::move(o);
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T, typename U&gt; inline bool operator==(const RefPtr&lt;T&gt;&amp; a, const RefPtr&lt;U&gt;&amp; b)
-    { 
-        return a.get() == b.get(); 
-    }
</del><ins>+template&lt;typename T&gt; template&lt;typename U&gt; inline RefPtr&lt;T&gt;&amp; RefPtr&lt;T&gt;::operator=(Ref&lt;U&gt;&amp;&amp; reference)
+{
+    RefPtr ptr = WTF::move(reference);
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T, typename U&gt; inline bool operator==(const RefPtr&lt;T&gt;&amp; a, U* b)
-    { 
-        return a.get() == b; 
-    }
-    
-    template&lt;typename T, typename U&gt; inline bool operator==(T* a, const RefPtr&lt;U&gt;&amp; b) 
-    {
-        return a == b.get(); 
-    }
-    
-    template&lt;typename T, typename U&gt; inline bool operator!=(const RefPtr&lt;T&gt;&amp; a, const RefPtr&lt;U&gt;&amp; b)
-    { 
-        return a.get() != b.get(); 
-    }
</del><ins>+template&lt;class T&gt; inline void RefPtr&lt;T&gt;::swap(RefPtr&amp; o)
+{
+    std::swap(m_ptr, o.m_ptr);
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T, typename U&gt; inline bool operator!=(const RefPtr&lt;T&gt;&amp; a, U* b)
-    {
-        return a.get() != b; 
-    }
</del><ins>+template&lt;class T&gt; inline void swap(RefPtr&lt;T&gt;&amp; a, RefPtr&lt;T&gt;&amp; b)
+{
+    a.swap(b);
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T, typename U&gt; inline bool operator!=(T* a, const RefPtr&lt;U&gt;&amp; b)
-    { 
-        return a != b.get(); 
-    }
-    
-    template&lt;typename T, typename U&gt; inline RefPtr&lt;T&gt; static_pointer_cast(const RefPtr&lt;U&gt;&amp; p)
-    { 
-        return RefPtr&lt;T&gt;(static_cast&lt;T*&gt;(p.get())); 
-    }
</del><ins>+template&lt;typename T, typename U&gt; inline bool operator==(const RefPtr&lt;T&gt;&amp; a, const RefPtr&lt;U&gt;&amp; b)
+{ 
+    return a.get() == b.get(); 
+}
</ins><span class="cx"> 
</span><del>-    template &lt;typename T&gt; struct IsSmartPtr&lt;RefPtr&lt;T&gt;&gt; {
-        static const bool value = true;
-    };
</del><ins>+template&lt;typename T, typename U&gt; inline bool operator==(const RefPtr&lt;T&gt;&amp; a, U* b)
+{ 
+    return a.get() == b; 
+}
</ins><span class="cx"> 
</span><ins>+template&lt;typename T, typename U&gt; inline bool operator==(T* a, const RefPtr&lt;U&gt;&amp; b) 
+{
+    return a == b.get(); 
+}
+
+template&lt;typename T, typename U&gt; inline bool operator!=(const RefPtr&lt;T&gt;&amp; a, const RefPtr&lt;U&gt;&amp; b)
+{ 
+    return a.get() != b.get(); 
+}
+
+template&lt;typename T, typename U&gt; inline bool operator!=(const RefPtr&lt;T&gt;&amp; a, U* b)
+{
+    return a.get() != b; 
+}
+
+template&lt;typename T, typename U&gt; inline bool operator!=(T* a, const RefPtr&lt;U&gt;&amp; b)
+{ 
+    return a != b.get(); 
+}
+
+template&lt;typename T, typename U&gt; inline RefPtr&lt;T&gt; static_pointer_cast(const RefPtr&lt;U&gt;&amp; p)
+{ 
+    return RefPtr&lt;T&gt;(static_cast&lt;T*&gt;(p.get())); 
+}
+
+template &lt;typename T&gt; struct IsSmartPtr&lt;RefPtr&lt;T&gt;&gt; {
+    static const bool value = true;
+};
+
</ins><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span><span class="cx"> using WTF::RefPtr;
</span></span></pre></div>
<a id="trunkSourceWTFwtfRetainPtrh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RetainPtr.h (177695 => 177696)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RetainPtr.h        2014-12-23 22:14:48 UTC (rev 177695)
+++ trunk/Source/WTF/wtf/RetainPtr.h        2014-12-23 22:16:46 UTC (rev 177696)
</span><span class="lines">@@ -45,270 +45,270 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><del>-    // Unlike most most of our smart pointers, RetainPtr can take either the pointer type or the pointed-to type,
-    // so both RetainPtr&lt;NSDictionary&gt; and RetainPtr&lt;CFDictionaryRef&gt; will work.
</del><ins>+// Unlike most most of our smart pointers, RetainPtr can take either the pointer type or the pointed-to type,
+// so both RetainPtr&lt;NSDictionary&gt; and RetainPtr&lt;CFDictionaryRef&gt; will work.
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; class RetainPtr;
</del><ins>+template&lt;typename T&gt; class RetainPtr;
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; RetainPtr&lt;T&gt; adoptCF(T CF_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
-    template&lt;typename T&gt; RetainPtr&lt;T&gt; adoptNS(T NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
</del><ins>+template&lt;typename T&gt; RetainPtr&lt;T&gt; adoptCF(T CF_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
+template&lt;typename T&gt; RetainPtr&lt;T&gt; adoptNS(T NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; class RetainPtr {
-    public:
-        typedef typename std::remove_pointer&lt;T&gt;::type ValueType;
-        typedef ValueType* PtrType;
-        typedef CFTypeRef StorageType;
</del><ins>+template&lt;typename T&gt; class RetainPtr {
+public:
+    typedef typename std::remove_pointer&lt;T&gt;::type ValueType;
+    typedef ValueType* PtrType;
+    typedef CFTypeRef StorageType;
</ins><span class="cx"> 
</span><del>-        RetainPtr() : m_ptr(nullptr) { }
-        RetainPtr(PtrType ptr) : m_ptr(toStorageType(ptr)) { if (m_ptr) CFRetain(m_ptr); }
</del><ins>+    RetainPtr() : m_ptr(nullptr) { }
+    RetainPtr(PtrType ptr) : m_ptr(toStorageType(ptr)) { if (m_ptr) CFRetain(m_ptr); }
</ins><span class="cx"> 
</span><del>-        RetainPtr(const RetainPtr&amp; o) : m_ptr(o.m_ptr) { if (StorageType ptr = m_ptr) CFRetain(ptr); }
</del><ins>+    RetainPtr(const RetainPtr&amp; o) : m_ptr(o.m_ptr) { if (StorageType ptr = m_ptr) CFRetain(ptr); }
</ins><span class="cx"> 
</span><del>-        RetainPtr(RetainPtr&amp;&amp; o) : m_ptr(toStorageType(o.leakRef())) { }
-        template&lt;typename U&gt; RetainPtr(RetainPtr&lt;U&gt;&amp;&amp; o) : m_ptr(toStorageType(o.leakRef())) { }
</del><ins>+    RetainPtr(RetainPtr&amp;&amp; o) : m_ptr(toStorageType(o.leakRef())) { }
+    template&lt;typename U&gt; RetainPtr(RetainPtr&lt;U&gt;&amp;&amp; o) : m_ptr(toStorageType(o.leakRef())) { }
</ins><span class="cx"> 
</span><del>-        // Hash table deleted values, which are only constructed and never copied or destroyed.
-        RetainPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { }
-        bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); }
-        
-        ~RetainPtr() { if (StorageType ptr = m_ptr) CFRelease(ptr); }
-        
-        template&lt;typename U&gt; RetainPtr(const RetainPtr&lt;U&gt;&amp;);
</del><ins>+    // Hash table deleted values, which are only constructed and never copied or destroyed.
+    RetainPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { }
+    bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); }
+    
+    ~RetainPtr() { if (StorageType ptr = m_ptr) CFRelease(ptr); }
+    
+    template&lt;typename U&gt; RetainPtr(const RetainPtr&lt;U&gt;&amp;);
</ins><span class="cx"> 
</span><del>-        void clear();
-        PtrType leakRef() WARN_UNUSED_RETURN;
-        PtrType autorelease();
</del><ins>+    void clear();
+    PtrType leakRef() WARN_UNUSED_RETURN;
+    PtrType autorelease();
</ins><span class="cx"> 
</span><del>-        PtrType get() const { return fromStorageType(m_ptr); }
-        PtrType operator-&gt;() const { return fromStorageType(m_ptr); }
-        explicit operator PtrType() const { return fromStorageType(m_ptr); }
-        explicit operator bool() const { return m_ptr; }
</del><ins>+    PtrType get() const { return fromStorageType(m_ptr); }
+    PtrType operator-&gt;() const { return fromStorageType(m_ptr); }
+    explicit operator PtrType() const { return fromStorageType(m_ptr); }
+    explicit operator bool() const { return m_ptr; }
</ins><span class="cx"> 
</span><del>-        bool operator!() const { return !m_ptr; }
</del><ins>+    bool operator!() const { return !m_ptr; }
+
+    // This conversion operator allows implicit conversion to bool but not to other integer types.
+    typedef StorageType RetainPtr::*UnspecifiedBoolType;
+    operator UnspecifiedBoolType() const { return m_ptr ? &amp;RetainPtr::m_ptr : nullptr; }
</ins><span class="cx">     
</span><del>-        // This conversion operator allows implicit conversion to bool but not to other integer types.
-        typedef StorageType RetainPtr::*UnspecifiedBoolType;
-        operator UnspecifiedBoolType() const { return m_ptr ? &amp;RetainPtr::m_ptr : nullptr; }
-        
-        RetainPtr&amp; operator=(const RetainPtr&amp;);
-        template&lt;typename U&gt; RetainPtr&amp; operator=(const RetainPtr&lt;U&gt;&amp;);
-        RetainPtr&amp; operator=(PtrType);
-        template&lt;typename U&gt; RetainPtr&amp; operator=(U*);
</del><ins>+    RetainPtr&amp; operator=(const RetainPtr&amp;);
+    template&lt;typename U&gt; RetainPtr&amp; operator=(const RetainPtr&lt;U&gt;&amp;);
+    RetainPtr&amp; operator=(PtrType);
+    template&lt;typename U&gt; RetainPtr&amp; operator=(U*);
</ins><span class="cx"> 
</span><del>-        RetainPtr&amp; operator=(RetainPtr&amp;&amp;);
-        template&lt;typename U&gt; RetainPtr&amp; operator=(RetainPtr&lt;U&gt;&amp;&amp;);
</del><ins>+    RetainPtr&amp; operator=(RetainPtr&amp;&amp;);
+    template&lt;typename U&gt; RetainPtr&amp; operator=(RetainPtr&lt;U&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><del>-        void swap(RetainPtr&amp;);
</del><ins>+    void swap(RetainPtr&amp;);
</ins><span class="cx"> 
</span><del>-        template&lt;typename U&gt; friend RetainPtr&lt;U&gt; adoptCF(U CF_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
-        template&lt;typename U&gt; friend RetainPtr&lt;U&gt; adoptNS(U NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
</del><ins>+    template&lt;typename U&gt; friend RetainPtr&lt;U&gt; adoptCF(U CF_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
+    template&lt;typename U&gt; friend RetainPtr&lt;U&gt; adoptNS(U NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
</ins><span class="cx"> 
</span><del>-    private:
-        enum AdoptTag { Adopt };
-        RetainPtr(PtrType ptr, AdoptTag) : m_ptr(toStorageType(ptr)) { }
</del><ins>+private:
+    enum AdoptTag { Adopt };
+    RetainPtr(PtrType ptr, AdoptTag) : m_ptr(toStorageType(ptr)) { }
</ins><span class="cx"> 
</span><del>-        static PtrType hashTableDeletedValue() { return reinterpret_cast&lt;PtrType&gt;(-1); }
</del><ins>+    static PtrType hashTableDeletedValue() { return reinterpret_cast&lt;PtrType&gt;(-1); }
</ins><span class="cx"> 
</span><span class="cx"> #if defined (__OBJC__) &amp;&amp; __has_feature(objc_arc)
</span><del>-        template&lt;typename U&gt;
-        typename std::enable_if&lt;std::is_convertible&lt;U, id&gt;::value, PtrType&gt;::type
-        fromStorageTypeHelper(StorageType ptr) const
-        {
-            return (__bridge PtrType)ptr;
-        }
</del><ins>+    template&lt;typename U&gt;
+    typename std::enable_if&lt;std::is_convertible&lt;U, id&gt;::value, PtrType&gt;::type
+    fromStorageTypeHelper(StorageType ptr) const
+    {
+        return (__bridge PtrType)ptr;
+    }
</ins><span class="cx"> 
</span><del>-        template&lt;typename U&gt;
-        typename std::enable_if&lt;!std::is_convertible&lt;U, id&gt;::value, PtrType&gt;::type
-        fromStorageTypeHelper(StorageType ptr) const
-        {
-            return (PtrType)ptr;
-        }
</del><ins>+    template&lt;typename U&gt;
+    typename std::enable_if&lt;!std::is_convertible&lt;U, id&gt;::value, PtrType&gt;::type
+    fromStorageTypeHelper(StorageType ptr) const
+    {
+        return (PtrType)ptr;
+    }
</ins><span class="cx"> 
</span><del>-        PtrType fromStorageType(StorageType ptr) const { return fromStorageTypeHelper&lt;PtrType&gt;(ptr); }
-        StorageType toStorageType(id ptr) const { return (__bridge StorageType)ptr; }
-        StorageType toStorageType(CFTypeRef ptr) const { return (StorageType)ptr; }
</del><ins>+    PtrType fromStorageType(StorageType ptr) const { return fromStorageTypeHelper&lt;PtrType&gt;(ptr); }
+    StorageType toStorageType(id ptr) const { return (__bridge StorageType)ptr; }
+    StorageType toStorageType(CFTypeRef ptr) const { return (StorageType)ptr; }
</ins><span class="cx"> #else
</span><del>-        PtrType fromStorageType(StorageType ptr) const { return (PtrType)ptr; }
-        StorageType toStorageType(PtrType ptr) const { return (StorageType)ptr; }
</del><ins>+    PtrType fromStorageType(StorageType ptr) const { return (PtrType)ptr; }
+    StorageType toStorageType(PtrType ptr) const { return (StorageType)ptr; }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        StorageType m_ptr;
-    };
</del><ins>+    StorageType m_ptr;
+};
</ins><span class="cx"> 
</span><del>-    // Helper function for creating a RetainPtr using template argument deduction.
-    template&lt;typename T&gt; inline RetainPtr&lt;T&gt; retainPtr(T) WARN_UNUSED_RETURN;
</del><ins>+// Helper function for creating a RetainPtr using template argument deduction.
+template&lt;typename T&gt; inline RetainPtr&lt;T&gt; retainPtr(T) WARN_UNUSED_RETURN;
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; template&lt;typename U&gt; inline RetainPtr&lt;T&gt;::RetainPtr(const RetainPtr&lt;U&gt;&amp; o)
-        : m_ptr(toStorageType(o.get()))
-    {
-        if (StorageType ptr = m_ptr)
-            CFRetain(ptr);
-    }
</del><ins>+template&lt;typename T&gt; template&lt;typename U&gt; inline RetainPtr&lt;T&gt;::RetainPtr(const RetainPtr&lt;U&gt;&amp; o)
+    : m_ptr(toStorageType(o.get()))
+{
+    if (StorageType ptr = m_ptr)
+        CFRetain(ptr);
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline void RetainPtr&lt;T&gt;::clear()
-    {
-        if (StorageType ptr = m_ptr) {
-            m_ptr = nullptr;
-            CFRelease(ptr);
-        }
</del><ins>+template&lt;typename T&gt; inline void RetainPtr&lt;T&gt;::clear()
+{
+    if (StorageType ptr = m_ptr) {
+        m_ptr = nullptr;
+        CFRelease(ptr);
</ins><span class="cx">     }
</span><ins>+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline typename RetainPtr&lt;T&gt;::PtrType RetainPtr&lt;T&gt;::leakRef()
-    {
-        return fromStorageType(std::exchange(m_ptr, nullptr));
-    }
</del><ins>+template&lt;typename T&gt; inline typename RetainPtr&lt;T&gt;::PtrType RetainPtr&lt;T&gt;::leakRef()
+{
+    return fromStorageType(std::exchange(m_ptr, nullptr));
+}
</ins><span class="cx"> 
</span><span class="cx"> #ifdef __OBJC__
</span><del>-    template&lt;typename T&gt; inline auto RetainPtr&lt;T&gt;::autorelease() -&gt; PtrType
-    {
-        return (__bridge PtrType)CFBridgingRelease(leakRef());
-    }
</del><ins>+template&lt;typename T&gt; inline auto RetainPtr&lt;T&gt;::autorelease() -&gt; PtrType
+{
+    return (__bridge PtrType)CFBridgingRelease(leakRef());
+}
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(const RetainPtr&amp; o)
-    {
-        RetainPtr ptr = o;
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(const RetainPtr&amp; o)
+{
+    RetainPtr ptr = o;
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; template&lt;typename U&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(const RetainPtr&lt;U&gt;&amp; o)
-    {
-        RetainPtr ptr = o;
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; template&lt;typename U&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(const RetainPtr&lt;U&gt;&amp; o)
+{
+    RetainPtr ptr = o;
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(PtrType optr)
-    {
-        RetainPtr ptr = optr;
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(PtrType optr)
+{
+    RetainPtr ptr = optr;
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; template&lt;typename U&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(U* optr)
-    {
-        RetainPtr ptr = optr;
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; template&lt;typename U&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(U* optr)
+{
+    RetainPtr ptr = optr;
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(RetainPtr&amp;&amp; o)
-    {
-        RetainPtr ptr = WTF::move(o);
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(RetainPtr&amp;&amp; o)
+{
+    RetainPtr ptr = WTF::move(o);
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; template&lt;typename U&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(RetainPtr&lt;U&gt;&amp;&amp; o)
-    {
-        RetainPtr ptr = WTF::move(o);
-        swap(ptr);
-        return *this;
-    }
</del><ins>+template&lt;typename T&gt; template&lt;typename U&gt; inline RetainPtr&lt;T&gt;&amp; RetainPtr&lt;T&gt;::operator=(RetainPtr&lt;U&gt;&amp;&amp; o)
+{
+    RetainPtr ptr = WTF::move(o);
+    swap(ptr);
+    return *this;
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline void RetainPtr&lt;T&gt;::swap(RetainPtr&amp; o)
-    {
-        std::swap(m_ptr, o.m_ptr);
-    }
</del><ins>+template&lt;typename T&gt; inline void RetainPtr&lt;T&gt;::swap(RetainPtr&amp; o)
+{
+    std::swap(m_ptr, o.m_ptr);
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline void swap(RetainPtr&lt;T&gt;&amp; a, RetainPtr&lt;T&gt;&amp; b)
-    {
-        a.swap(b);
-    }
</del><ins>+template&lt;typename T&gt; inline void swap(RetainPtr&lt;T&gt;&amp; a, RetainPtr&lt;T&gt;&amp; b)
+{
+    a.swap(b);
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T, typename U&gt; inline bool operator==(const RetainPtr&lt;T&gt;&amp; a, const RetainPtr&lt;U&gt;&amp; b)
-    { 
-        return a.get() == b.get(); 
-    }
</del><ins>+template&lt;typename T, typename U&gt; inline bool operator==(const RetainPtr&lt;T&gt;&amp; a, const RetainPtr&lt;U&gt;&amp; b)
+{ 
+    return a.get() == b.get(); 
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T, typename U&gt; inline bool operator==(const RetainPtr&lt;T&gt;&amp; a, U* b)
-    {
-        return a.get() == b; 
-    }
</del><ins>+template&lt;typename T, typename U&gt; inline bool operator==(const RetainPtr&lt;T&gt;&amp; a, U* b)
+{
+    return a.get() == b; 
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T, typename U&gt; inline bool operator==(T* a, const RetainPtr&lt;U&gt;&amp; b) 
-    {
-        return a == b.get(); 
-    }
</del><ins>+template&lt;typename T, typename U&gt; inline bool operator==(T* a, const RetainPtr&lt;U&gt;&amp; b) 
+{
+    return a == b.get(); 
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T, typename U&gt; inline bool operator!=(const RetainPtr&lt;T&gt;&amp; a, const RetainPtr&lt;U&gt;&amp; b)
-    { 
-        return a.get() != b.get(); 
-    }
</del><ins>+template&lt;typename T, typename U&gt; inline bool operator!=(const RetainPtr&lt;T&gt;&amp; a, const RetainPtr&lt;U&gt;&amp; b)
+{ 
+    return a.get() != b.get(); 
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T, typename U&gt; inline bool operator!=(const RetainPtr&lt;T&gt;&amp; a, U* b)
-    {
-        return a.get() != b; 
-    }
</del><ins>+template&lt;typename T, typename U&gt; inline bool operator!=(const RetainPtr&lt;T&gt;&amp; a, U* b)
+{
+    return a.get() != b; 
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T, typename U&gt; inline bool operator!=(T* a, const RetainPtr&lt;U&gt;&amp; b)
-    { 
-        return a != b.get(); 
-    }
</del><ins>+template&lt;typename T, typename U&gt; inline bool operator!=(T* a, const RetainPtr&lt;U&gt;&amp; b)
+{ 
+    return a != b.get(); 
+}
</ins><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline RetainPtr&lt;T&gt; adoptCF(T CF_RELEASES_ARGUMENT ptr)
-    {
</del><ins>+template&lt;typename T&gt; inline RetainPtr&lt;T&gt; adoptCF(T CF_RELEASES_ARGUMENT ptr)
+{
</ins><span class="cx"> #ifdef __OBJC__
</span><del>-        static_assert((!std::is_convertible&lt;T, id&gt;::value), &quot;Don't use adoptCF with Objective-C pointer types, use adoptNS.&quot;);
</del><ins>+    static_assert((!std::is_convertible&lt;T, id&gt;::value), &quot;Don't use adoptCF with Objective-C pointer types, use adoptNS.&quot;);
</ins><span class="cx"> #endif
</span><del>-        return RetainPtr&lt;T&gt;(ptr, RetainPtr&lt;T&gt;::Adopt);
-    }
</del><ins>+    return RetainPtr&lt;T&gt;(ptr, RetainPtr&lt;T&gt;::Adopt);
+}
</ins><span class="cx"> 
</span><span class="cx"> #ifdef __OBJC__
</span><del>-    template&lt;typename T&gt; inline RetainPtr&lt;T&gt; adoptNS(T NS_RELEASES_ARGUMENT ptr)
-    {
</del><ins>+template&lt;typename T&gt; inline RetainPtr&lt;T&gt; adoptNS(T NS_RELEASES_ARGUMENT ptr)
+{
</ins><span class="cx"> #if __has_feature(objc_arc)
</span><del>-        return ptr;
</del><ins>+    return ptr;
</ins><span class="cx"> #elif defined(OBJC_NO_GC)
</span><del>-        return RetainPtr&lt;T&gt;(ptr, RetainPtr&lt;T&gt;::Adopt);
</del><ins>+    return RetainPtr&lt;T&gt;(ptr, RetainPtr&lt;T&gt;::Adopt);
</ins><span class="cx"> #else
</span><del>-        RetainPtr&lt;T&gt; result = ptr;
-        [ptr release];
-        return result;
</del><ins>+    RetainPtr&lt;T&gt; result = ptr;
+    [ptr release];
+    return result;
</ins><span class="cx"> #endif
</span><del>-    }
</del><ins>+}
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline RetainPtr&lt;T&gt; retainPtr(T ptr)
-    {
-        return ptr;
-    }
</del><ins>+template&lt;typename T&gt; inline RetainPtr&lt;T&gt; retainPtr(T ptr)
+{
+    return ptr;
+}
</ins><span class="cx"> 
</span><del>-    template &lt;typename T&gt; struct IsSmartPtr&lt;RetainPtr&lt;T&gt;&gt; {
-        static const bool value = true;
-    };
</del><ins>+template &lt;typename T&gt; struct IsSmartPtr&lt;RetainPtr&lt;T&gt;&gt; {
+    static const bool value = true;
+};
</ins><span class="cx"> 
</span><del>-    template&lt;typename P&gt; struct HashTraits&lt;RetainPtr&lt;P&gt;&gt; : SimpleClassHashTraits&lt;RetainPtr&lt;P&gt;&gt; {
-    };
-    
-    template&lt;typename P&gt; struct DefaultHash&lt;RetainPtr&lt;P&gt;&gt; {
-        typedef PtrHash&lt;RetainPtr&lt;P&gt;&gt; Hash;
-    };
</del><ins>+template&lt;typename P&gt; struct HashTraits&lt;RetainPtr&lt;P&gt;&gt; : SimpleClassHashTraits&lt;RetainPtr&lt;P&gt;&gt; {
+};
</ins><span class="cx"> 
</span><del>-    template &lt;typename P&gt;
-    struct RetainPtrObjectHashTraits : SimpleClassHashTraits&lt;RetainPtr&lt;P&gt;&gt; {
-        static const RetainPtr&lt;P&gt;&amp; emptyValue()
-        {
-            static RetainPtr&lt;P&gt;&amp; null = *(new RetainPtr&lt;P&gt;);
-            return null;
-        }
-    };
</del><ins>+template&lt;typename P&gt; struct DefaultHash&lt;RetainPtr&lt;P&gt;&gt; {
+    typedef PtrHash&lt;RetainPtr&lt;P&gt;&gt; Hash;
+};
</ins><span class="cx"> 
</span><del>-    template &lt;typename P&gt;
-    struct RetainPtrObjectHash {
-        static unsigned hash(const RetainPtr&lt;P&gt;&amp; o)
-        {
-            ASSERT_WITH_MESSAGE(o.get(), &quot;attempt to use null RetainPtr in HashTable&quot;);
-            return static_cast&lt;unsigned&gt;(CFHash(o.get()));
-        }
-        static bool equal(const RetainPtr&lt;P&gt;&amp; a, const RetainPtr&lt;P&gt;&amp; b)
-        {
-            return CFEqual(a.get(), b.get());
-        }
-        static const bool safeToCompareToEmptyOrDeleted = false;
-    };
</del><ins>+template &lt;typename P&gt;
+struct RetainPtrObjectHashTraits : SimpleClassHashTraits&lt;RetainPtr&lt;P&gt;&gt; {
+    static const RetainPtr&lt;P&gt;&amp; emptyValue()
+    {
+        static RetainPtr&lt;P&gt;&amp; null = *(new RetainPtr&lt;P&gt;);
+        return null;
+    }
+};
</ins><span class="cx"> 
</span><ins>+template &lt;typename P&gt;
+struct RetainPtrObjectHash {
+    static unsigned hash(const RetainPtr&lt;P&gt;&amp; o)
+    {
+        ASSERT_WITH_MESSAGE(o.get(), &quot;attempt to use null RetainPtr in HashTable&quot;);
+        return static_cast&lt;unsigned&gt;(CFHash(o.get()));
+    }
+    static bool equal(const RetainPtr&lt;P&gt;&amp; a, const RetainPtr&lt;P&gt;&amp; b)
+    {
+        return CFEqual(a.get(), b.get());
+    }
+    static const bool safeToCompareToEmptyOrDeleted = false;
+};
+
</ins><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span><span class="cx"> using WTF::RetainPtr;
</span></span></pre>
</div>
</div>

</body>
</html>