<!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>[197132] trunk</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/197132">197132</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2016-02-25 14:24:32 -0800 (Thu, 25 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Should template RefCounter instead of RefCounter::Token
https://bugs.webkit.org/show_bug.cgi?id=154691

Reviewed by Anders Carlsson.

Source/WebCore:

Mechanical update per RefCounter interface change.

* page/PageThrottler.cpp:
(WebCore::PageThrottler::mediaActivityToken):
(WebCore::PageThrottler::pageLoadActivityToken):
(WebCore::PageThrottler::setActivityFlag):
* page/PageThrottler.h:
* platform/VNodeTracker.h:

Source/WebKit2:

Mechanical update per RefCounter interface change.

* UIProcess/Plugins/PluginProcessManager.h:
(WebKit::PluginProcessManager::processSuppressionDisabledToken):
(WebKit::PluginProcessManager::processSuppressionDisabled):
* UIProcess/ProcessThrottler.h:
(WebKit::ProcessThrottler::foregroundActivityToken):
(WebKit::ProcessThrottler::backgroundActivityToken):
* UIProcess/WebProcessPool.h:

Source/WTF:

My real goal here is to make the counter accurate. Currently returning a Token from token&lt;&gt;()
results in ref-count churn. Fixing this either means changing the return value, or improving
Token (which will probably mean replacing it with RefPtr). Either way would break the current
type checking. Move type tag to RefCount so this can still be enforced.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/RefCounter.cpp: Removed.
    - Removed RefCounter.cpp.
* wtf/RefCounter.h:
(WTF::RefCounter::Token::Token):
(WTF::RefCounter::Token::operator bool):
(WTF::RefCounter::RefCounter):
(WTF::RefCounter::count):
(WTF::RefCounter::value):
(WTF::RefCounter&lt;T&gt;::Count::ref):
(WTF::RefCounter&lt;T&gt;::Count::deref):
(WTF::RefCounter&lt;T&gt;::RefCounter):
(WTF::RefCounter&lt;T&gt;::~RefCounter):
(WTF::RefCounter&lt;T&gt;::Token::Token):
(WTF::=):
(WTF::RefCounter::token): Deleted.
(WTF::RefCounter::Token&lt;T&gt;::Token): Deleted.
    - RefCounter -&gt; RefCounter&lt;T&gt;,
    - Token&lt;T&gt; -&gt; Token,
    - renamed token&lt;&gt;() -&gt; count().

Tools:

Mechanical update per RefCounter interface change.

* TestWebKitAPI/Tests/WTF/RefCounter.cpp:
(TestWebKitAPI::TEST):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFWTFvcxprojWTFvcxproj">trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj</a></li>
<li><a href="#trunkSourceWTFWTFvcxprojWTFvcxprojfilters">trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters</a></li>
<li><a href="#trunkSourceWTFWTFxcodeprojprojectpbxproj">trunk/Source/WTF/WTF.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWTFwtfCMakeListstxt">trunk/Source/WTF/wtf/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWTFwtfRefCounterh">trunk/Source/WTF/wtf/RefCounter.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagePageThrottlercpp">trunk/Source/WebCore/page/PageThrottler.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageThrottlerh">trunk/Source/WebCore/page/PageThrottler.h</a></li>
<li><a href="#trunkSourceWebCoreplatformVNodeTrackerh">trunk/Source/WebCore/platform/VNodeTracker.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsPluginProcessManagerh">trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessProcessThrottlerh">trunk/Source/WebKit2/UIProcess/ProcessThrottler.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolh">trunk/Source/WebKit2/UIProcess/WebProcessPool.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWTFRefCountercpp">trunk/Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWTFwtfRefCountercpp">trunk/Source/WTF/wtf/RefCounter.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WTF/ChangeLog        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-02-25  Gavin Barraclough  &lt;barraclough@apple.com&gt;
+
+        Should template RefCounter instead of RefCounter::Token
+        https://bugs.webkit.org/show_bug.cgi?id=154691
+
+        Reviewed by Anders Carlsson.
+
+        My real goal here is to make the counter accurate. Currently returning a Token from token&lt;&gt;()
+        results in ref-count churn. Fixing this either means changing the return value, or improving
+        Token (which will probably mean replacing it with RefPtr). Either way would break the current
+        type checking. Move type tag to RefCount so this can still be enforced.
+
+        * WTF.vcxproj/WTF.vcxproj:
+        * WTF.vcxproj/WTF.vcxproj.filters:
+        * WTF.xcodeproj/project.pbxproj:
+        * wtf/CMakeLists.txt:
+        * wtf/RefCounter.cpp: Removed.
+            - Removed RefCounter.cpp.
+        * wtf/RefCounter.h:
+        (WTF::RefCounter::Token::Token):
+        (WTF::RefCounter::Token::operator bool):
+        (WTF::RefCounter::RefCounter):
+        (WTF::RefCounter::count):
+        (WTF::RefCounter::value):
+        (WTF::RefCounter&lt;T&gt;::Count::ref):
+        (WTF::RefCounter&lt;T&gt;::Count::deref):
+        (WTF::RefCounter&lt;T&gt;::RefCounter):
+        (WTF::RefCounter&lt;T&gt;::~RefCounter):
+        (WTF::RefCounter&lt;T&gt;::Token::Token):
+        (WTF::=):
+        (WTF::RefCounter::token): Deleted.
+        (WTF::RefCounter::Token&lt;T&gt;::Token): Deleted.
+            - RefCounter -&gt; RefCounter&lt;T&gt;,
+            - Token&lt;T&gt; -&gt; Token,
+            - renamed token&lt;&gt;() -&gt; count().
+
</ins><span class="cx"> 2016-02-25  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         HashMap::ensure() should return an AddResult like all the other add-like functions.
</span></span></pre></div>
<a id="trunkSourceWTFWTFvcxprojWTFvcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -111,7 +111,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\RAMSize.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\RandomNumber.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\RefCountedLeakCounter.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\wtf\RefCounter.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\RunLoop.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\SHA1.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\SixCharacterHash.cpp&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWTFWTFvcxprojWTFvcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -243,7 +243,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\FastBitVector.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;wtf&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\wtf\RefCounter.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\win\WTFDLL.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;wtf\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span></span></pre></div>
<a id="trunkSourceWTFWTFxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -111,7 +111,6 @@
</span><span class="cx">                 8134013815B092FD001FF0B8 /* Base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8134013615B092FD001FF0B8 /* Base64.cpp */; };
</span><span class="cx">                 8134013915B092FD001FF0B8 /* Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8134013715B092FD001FF0B8 /* Base64.h */; };
</span><span class="cx">                 83FBA93219DF459700F30ADB /* TypeCasts.h in Headers */ = {isa = PBXBuildFile; fileRef = 83FBA93119DF459700F30ADB /* TypeCasts.h */; };
</span><del>-                86F46F601A2840EE00CCBF22 /* RefCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86F46F5E1A2840EE00CCBF22 /* RefCounter.cpp */; };
</del><span class="cx">                 86F46F611A2840EE00CCBF22 /* RefCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 86F46F5F1A2840EE00CCBF22 /* RefCounter.h */; };
</span><span class="cx">                 93934BD318A1E8C300D0D6A1 /* StringViewObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93934BD218A1E8C300D0D6A1 /* StringViewObjC.mm */; };
</span><span class="cx">                 93934BD518A1F16900D0D6A1 /* StringViewCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93934BD418A1F16900D0D6A1 /* StringViewCF.cpp */; };
</span><span class="lines">@@ -425,7 +424,6 @@
</span><span class="cx">                 8134013615B092FD001FF0B8 /* Base64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Base64.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8134013715B092FD001FF0B8 /* Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base64.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 83FBA93119DF459700F30ADB /* TypeCasts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeCasts.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                86F46F5E1A2840EE00CCBF22 /* RefCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RefCounter.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 86F46F5F1A2840EE00CCBF22 /* RefCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefCounter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93934BD218A1E8C300D0D6A1 /* StringViewObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = StringViewObjC.mm; path = mac/StringViewObjC.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93934BD418A1F16900D0D6A1 /* StringViewCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringViewCF.cpp; path = cf/StringViewCF.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -889,7 +887,6 @@
</span><span class="cx">                                 A8A47300151A825B004123FF /* RefCountedArray.h */,
</span><span class="cx">                                 A8A47301151A825B004123FF /* RefCountedLeakCounter.cpp */,
</span><span class="cx">                                 A8A47302151A825B004123FF /* RefCountedLeakCounter.h */,
</span><del>-                                86F46F5E1A2840EE00CCBF22 /* RefCounter.cpp */,
</del><span class="cx">                                 86F46F5F1A2840EE00CCBF22 /* RefCounter.h */,
</span><span class="cx">                                 A8A47303151A825B004123FF /* RefPtr.h */,
</span><span class="cx">                                 A8A47305151A825B004123FF /* RetainPtr.h */,
</span><span class="lines">@@ -1463,7 +1460,6 @@
</span><span class="cx">                                 143F611F1565F0F900DB514A /* RAMSize.cpp in Sources */,
</span><span class="cx">                                 A8A47414151A825B004123FF /* RandomNumber.cpp in Sources */,
</span><span class="cx">                                 A8A4741A151A825B004123FF /* RefCountedLeakCounter.cpp in Sources */,
</span><del>-                                86F46F601A2840EE00CCBF22 /* RefCounter.cpp in Sources */,
</del><span class="cx">                                 2CDED0F318115C85004DBA70 /* RunLoop.cpp in Sources */,
</span><span class="cx">                                 2CDED0EF18115C38004DBA70 /* RunLoopCF.cpp in Sources */,
</span><span class="cx">                                 1469419316EAAF6D0024E146 /* RunLoopTimerCF.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWTFwtfCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/CMakeLists.txt (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/CMakeLists.txt        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WTF/wtf/CMakeLists.txt        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -184,7 +184,6 @@
</span><span class="cx">     RAMSize.cpp
</span><span class="cx">     RandomNumber.cpp
</span><span class="cx">     RefCountedLeakCounter.cpp
</span><del>-    RefCounter.cpp
</del><span class="cx">     RunLoop.cpp
</span><span class="cx">     SHA1.cpp
</span><span class="cx">     SixCharacterHash.cpp
</span></span></pre></div>
<a id="trunkSourceWTFwtfRefCountercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WTF/wtf/RefCounter.cpp (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RefCounter.cpp        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WTF/wtf/RefCounter.cpp        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -1,76 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;RefCounter.h&quot;
-
-namespace WTF {
-
-void RefCounter::Count::ref()
-{
-    bool valueWasZero = !m_value;
-    ++m_value;
-    
-    if (valueWasZero &amp;&amp; m_refCounter)
-        m_refCounter-&gt;m_valueDidChange(true);
-}
-
-void RefCounter::Count::deref()
-{
-    ASSERT(m_value);
-    --m_value;
-
-    if (m_value)
-        return;
-
-    // The Count object is kept alive so long as either the RefCounter that created it remains
-    // allocated, or so long as its reference count is non-zero.
-    // If the RefCounter has already been deallocted then delete the Count when its reference
-    // count reaches zero.
-    if (m_refCounter)
-        m_refCounter-&gt;m_valueDidChange(false);
-    else
-        delete this;
-}
-
-RefCounter::RefCounter(std::function&lt;void(bool)&gt; valueDidChange)
-    : m_valueDidChange(valueDidChange)
-    , m_count(new Count(*this))
-{
-}
-
-RefCounter::~RefCounter()
-{
-    // The Count object is kept alive so long as either the RefCounter that created it remains
-    // allocated, or so long as its reference count is non-zero.
-    // If the reference count of the Count is already zero then delete it now, otherwise
-    // clear its m_refCounter pointer.
-    if (m_count-&gt;m_value)
-        m_count-&gt;m_refCounter = nullptr;
-    else
-        delete m_count;
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWTFwtfRefCounterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RefCounter.h (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RefCounter.h        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WTF/wtf/RefCounter.h        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><ins>+template&lt;typename T&gt;
</ins><span class="cx"> class RefCounter {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(RefCounter);
</span><span class="cx"> 
</span><span class="lines">@@ -55,17 +56,16 @@
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx"> public:
</span><del>-    template&lt;typename T&gt;
</del><span class="cx">     class Token  {
</span><span class="cx">     public:
</span><span class="cx">         Token() { }
</span><span class="cx">         Token(std::nullptr_t) { }
</span><del>-        inline Token(const Token&lt;T&gt;&amp;);
-        inline Token(Token&lt;T&gt;&amp;&amp;);
</del><ins>+        inline Token(const Token&amp;);
+        inline Token(Token&amp;&amp;);
</ins><span class="cx"> 
</span><del>-        inline Token&lt;T&gt;&amp; operator=(std::nullptr_t);
-        inline Token&lt;T&gt;&amp; operator=(const Token&lt;T&gt;&amp;);
-        inline Token&lt;T&gt;&amp; operator=(Token&lt;T&gt;&amp;&amp;);
</del><ins>+        inline Token&amp; operator=(std::nullptr_t);
+        inline Token&amp; operator=(const Token&amp;);
+        inline Token&amp; operator=(Token&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">         explicit operator bool() const { return m_ptr; }
</span><span class="cx"> 
</span><span class="lines">@@ -79,10 +79,9 @@
</span><span class="cx">     WTF_EXPORT_PRIVATE RefCounter(std::function&lt;void(bool)&gt; = [](bool) { });
</span><span class="cx">     WTF_EXPORT_PRIVATE ~RefCounter();
</span><span class="cx"> 
</span><del>-    template&lt;typename T&gt;
-    Token&lt;T&gt; token() const
</del><ins>+    Token count() const
</ins><span class="cx">     {
</span><del>-        return Token&lt;T&gt;(m_count);
</del><ins>+        return Token(m_count);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     unsigned value() const
</span><span class="lines">@@ -95,40 +94,89 @@
</span><span class="cx">     Count* m_count;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+template&lt;typename T&gt;
+inline void RefCounter&lt;T&gt;::Count::ref()
+{
+    bool valueWasZero = !m_value;
+    ++m_value;
+    
+    if (valueWasZero &amp;&amp; m_refCounter)
+        m_refCounter-&gt;m_valueDidChange(true);
+}
+
+template&lt;typename T&gt;
+inline void RefCounter&lt;T&gt;::Count::deref()
+{
+    ASSERT(m_value);
+    --m_value;
+
+    if (m_value)
+        return;
+
+    // The Count object is kept alive so long as either the RefCounter that created it remains
+    // allocated, or so long as its reference count is non-zero.
+    // If the RefCounter has already been deallocted then delete the Count when its reference
+    // count reaches zero.
+    if (m_refCounter)
+        m_refCounter-&gt;m_valueDidChange(false);
+    else
+        delete this;
+}
+
+template&lt;typename T&gt;
+inline RefCounter&lt;T&gt;::RefCounter(std::function&lt;void(bool)&gt; valueDidChange)
+    : m_valueDidChange(valueDidChange)
+    , m_count(new Count(*this))
+{
+}
+
+template&lt;typename T&gt;
+inline RefCounter&lt;T&gt;::~RefCounter()
+{
+    // The Count object is kept alive so long as either the RefCounter that created it remains
+    // allocated, or so long as its reference count is non-zero.
+    // If the reference count of the Count is already zero then delete it now, otherwise
+    // clear its m_refCounter pointer.
+    if (m_count-&gt;m_value)
+        m_count-&gt;m_refCounter = nullptr;
+    else
+        delete m_count;
+}
+
</ins><span class="cx"> template&lt;class T&gt;
</span><del>-inline RefCounter::Token&lt;T&gt;::Token(Count* count)
</del><ins>+inline RefCounter&lt;T&gt;::Token::Token(Count* count)
</ins><span class="cx">     : m_ptr(count)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;class T&gt;
</span><del>-inline RefCounter::Token&lt;T&gt;::Token(const RefCounter::Token&lt;T&gt;&amp; token)
</del><ins>+inline RefCounter&lt;T&gt;::Token::Token(const RefCounter::Token&amp; token)
</ins><span class="cx">     : m_ptr(token.m_ptr)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;class T&gt;
</span><del>-inline RefCounter::Token&lt;T&gt;::Token(RefCounter::Token&lt;T&gt;&amp;&amp; token)
</del><ins>+inline RefCounter&lt;T&gt;::Token::Token(RefCounter::Token&amp;&amp; token)
</ins><span class="cx">     : m_ptr(token.m_ptr)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;class T&gt;
</span><del>-inline RefCounter::Token&lt;T&gt;&amp; RefCounter::Token&lt;T&gt;::operator=(std::nullptr_t)
</del><ins>+inline typename RefCounter&lt;T&gt;::Token&amp; RefCounter&lt;T&gt;::Token::operator=(std::nullptr_t)
</ins><span class="cx"> {
</span><span class="cx">     m_ptr = nullptr;
</span><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;class T&gt;
</span><del>-inline RefCounter::Token&lt;T&gt;&amp; RefCounter::Token&lt;T&gt;::operator=(const RefCounter::Token&lt;T&gt;&amp; token)
</del><ins>+inline typename RefCounter&lt;T&gt;::Token&amp; RefCounter&lt;T&gt;::Token::operator=(const RefCounter&lt;T&gt;::Token&amp; token)
</ins><span class="cx"> {
</span><span class="cx">     m_ptr = token.m_ptr;
</span><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;class T&gt;
</span><del>-inline RefCounter::Token&lt;T&gt;&amp; RefCounter::Token&lt;T&gt;::operator=(RefCounter::Token&lt;T&gt;&amp;&amp; token)
</del><ins>+inline typename RefCounter&lt;T&gt;::Token&amp; RefCounter&lt;T&gt;::Token::operator=(RefCounter&lt;T&gt;::Token&amp;&amp; token)
</ins><span class="cx"> {
</span><span class="cx">     m_ptr = token.m_ptr;
</span><span class="cx">     return *this;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WebCore/ChangeLog        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-02-25  Gavin Barraclough  &lt;barraclough@apple.com&gt;
+
+        Should template RefCounter instead of RefCounter::Token
+        https://bugs.webkit.org/show_bug.cgi?id=154691
+
+        Reviewed by Anders Carlsson.
+
+        Mechanical update per RefCounter interface change.
+
+        * page/PageThrottler.cpp:
+        (WebCore::PageThrottler::mediaActivityToken):
+        (WebCore::PageThrottler::pageLoadActivityToken):
+        (WebCore::PageThrottler::setActivityFlag):
+        * page/PageThrottler.h:
+        * platform/VNodeTracker.h:
+
</ins><span class="cx"> 2016-02-25  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove LegacyIDB.
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageThrottlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageThrottler.cpp (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageThrottler.cpp        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WebCore/page/PageThrottler.cpp        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -41,12 +41,12 @@
</span><span class="cx"> 
</span><span class="cx"> PageActivityAssertionToken PageThrottler::mediaActivityToken()
</span><span class="cx"> {
</span><del>-    return m_mediaActivityCounter.token&lt;PageActivityAssertionTokenType&gt;();
</del><ins>+    return m_mediaActivityCounter.count();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PageActivityAssertionToken PageThrottler::pageLoadActivityToken()
</span><span class="cx"> {
</span><del>-    return m_pageLoadActivityCounter.token&lt;PageActivityAssertionTokenType&gt;();
</del><ins>+    return m_pageLoadActivityCounter.count();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageThrottler::setActivityFlag(PageActivityState::Flags flag, bool value)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageThrottlerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageThrottler.h (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageThrottler.h        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WebCore/page/PageThrottler.h        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -36,8 +36,9 @@
</span><span class="cx"> 
</span><span class="cx"> class Page;
</span><span class="cx"> 
</span><del>-enum PageActivityAssertionTokenType { };
-typedef RefCounter::Token&lt;PageActivityAssertionTokenType&gt; PageActivityAssertionToken;
</del><ins>+enum PageActivityCounterType { };
+typedef RefCounter&lt;PageActivityCounterType&gt; PageActivityCounter;
+typedef PageActivityCounter::Token PageActivityAssertionToken;
</ins><span class="cx"> 
</span><span class="cx"> struct PageActivityState {
</span><span class="cx">     enum {
</span><span class="lines">@@ -71,8 +72,8 @@
</span><span class="cx">     PageActivityState::Flags m_activityState { PageActivityState::NoFlags };
</span><span class="cx">     HysteresisActivity m_userInputHysteresis;
</span><span class="cx">     HysteresisActivity m_audiblePluginHysteresis;
</span><del>-    RefCounter m_mediaActivityCounter;
-    RefCounter m_pageLoadActivityCounter;
</del><ins>+    PageActivityCounter m_mediaActivityCounter;
+    PageActivityCounter m_pageLoadActivityCounter;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformVNodeTrackerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/VNodeTracker.h (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/VNodeTracker.h        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WebCore/platform/VNodeTracker.h        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -39,8 +39,9 @@
</span><span class="cx"> public:
</span><span class="cx">     using PressureHandler = std::function&lt;void(Critical)&gt;;
</span><span class="cx"> 
</span><del>-    enum TokenType { };
-    using Token = RefCounter::Token&lt;TokenType&gt;;
</del><ins>+    enum VNodeCounterType { };
+    using VNodeCounter = RefCounter&lt;VNodeCounterType&gt;;
+    using Token = VNodeCounter::Token;
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT static VNodeTracker&amp; singleton();
</span><span class="cx"> 
</span><span class="lines">@@ -59,7 +60,7 @@
</span><span class="cx">     unsigned m_hardVNodeLimit { 400 };
</span><span class="cx">     unsigned m_softVNodeLimit { 300 };
</span><span class="cx">     PressureHandler m_pressureHandler;
</span><del>-    RefCounter m_vnodeCounter;
</del><ins>+    VNodeCounter m_vnodeCounter;
</ins><span class="cx">     Timer m_pressureWarningTimer;
</span><span class="cx">     std::chrono::steady_clock::time_point m_lastWarningTime;
</span><span class="cx"> };
</span><span class="lines">@@ -74,7 +75,7 @@
</span><span class="cx">     if (!m_pressureHandler)
</span><span class="cx">         return Token();
</span><span class="cx"> 
</span><del>-    Token token(m_vnodeCounter.token&lt;TokenType&gt;());
</del><ins>+    Token token(m_vnodeCounter.count());
</ins><span class="cx">     checkPressureState();
</span><span class="cx">     return token;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WebKit2/ChangeLog        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-02-25  Gavin Barraclough  &lt;barraclough@apple.com&gt;
+
+        Should template RefCounter instead of RefCounter::Token
+        https://bugs.webkit.org/show_bug.cgi?id=154691
+
+        Reviewed by Anders Carlsson.
+
+        Mechanical update per RefCounter interface change.
+
+        * UIProcess/Plugins/PluginProcessManager.h:
+        (WebKit::PluginProcessManager::processSuppressionDisabledToken):
+        (WebKit::PluginProcessManager::processSuppressionDisabled):
+        * UIProcess/ProcessThrottler.h:
+        (WebKit::ProcessThrottler::foregroundActivityToken):
+        (WebKit::ProcessThrottler::backgroundActivityToken):
+        * UIProcess/WebProcessPool.h:
+
</ins><span class="cx"> 2016-02-25  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove LegacyIDB.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsPluginProcessManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -82,14 +82,14 @@
</span><span class="cx">     Vector&lt;RefPtr&lt;PluginProcessProxy&gt;&gt; m_pluginProcesses;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    RefCounter m_processSuppressionDisabledForPageCounter;
</del><ins>+    ProcessSuppressionDisabledCounter m_processSuppressionDisabledForPageCounter;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> inline ProcessSuppressionDisabledToken PluginProcessManager::processSuppressionDisabledToken()
</span><span class="cx"> {
</span><del>-    return m_processSuppressionDisabledForPageCounter.token&lt;ProcessSuppressionDisabledTokenType&gt;();
</del><ins>+    return m_processSuppressionDisabledForPageCounter.count();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool PluginProcessManager::processSuppressionDisabled() const
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessProcessThrottlerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ProcessThrottler.h (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ProcessThrottler.h        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WebKit2/UIProcess/ProcessThrottler.h        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -34,19 +34,23 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx">     
</span><del>-enum UserObservablePageTokenType { };
-typedef RefCounter::Token&lt;UserObservablePageTokenType&gt; UserObservablePageToken;
-enum ProcessSuppressionDisabledTokenType { };
-typedef RefCounter::Token&lt;ProcessSuppressionDisabledTokenType&gt; ProcessSuppressionDisabledToken;
</del><ins>+enum UserObservablePageCounterType { };
+typedef RefCounter&lt;UserObservablePageCounterType&gt; UserObservablePageCounter;
+typedef UserObservablePageCounter::Token UserObservablePageToken;
+enum ProcessSuppressionDisabledCounterType { };
+typedef RefCounter&lt;ProcessSuppressionDisabledCounterType&gt; ProcessSuppressionDisabledCounter;
+typedef ProcessSuppressionDisabledCounter::Token ProcessSuppressionDisabledToken;
</ins><span class="cx"> 
</span><span class="cx"> class ProcessThrottlerClient;
</span><span class="cx"> 
</span><span class="cx"> class ProcessThrottler : private ProcessAssertionClient {
</span><span class="cx"> public:
</span><del>-    enum ForegroundActivityTokenType { };
-    typedef RefCounter::Token&lt;ForegroundActivityTokenType&gt; ForegroundActivityToken;
-    enum BackgroundActivityTokenType { };
-    typedef RefCounter::Token&lt;BackgroundActivityTokenType&gt; BackgroundActivityToken;
</del><ins>+    enum ForegroundActivityCounterType { };
+    typedef RefCounter&lt;ForegroundActivityCounterType&gt; ForegroundActivityCounter;
+    typedef ForegroundActivityCounter::Token ForegroundActivityToken;
+    enum BackgroundActivityCounterType { };
+    typedef RefCounter&lt;BackgroundActivityCounterType&gt; BackgroundActivityCounter;
+    typedef BackgroundActivityCounter::Token BackgroundActivityToken;
</ins><span class="cx"> 
</span><span class="cx">     ProcessThrottler(ProcessThrottlerClient&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -69,19 +73,19 @@
</span><span class="cx">     ProcessThrottlerClient&amp; m_process;
</span><span class="cx">     std::unique_ptr&lt;ProcessAndUIAssertion&gt; m_assertion;
</span><span class="cx">     RunLoop::Timer&lt;ProcessThrottler&gt; m_suspendTimer;
</span><del>-    RefCounter m_foregroundCounter;
-    RefCounter m_backgroundCounter;
</del><ins>+    ForegroundActivityCounter m_foregroundCounter;
+    BackgroundActivityCounter m_backgroundCounter;
</ins><span class="cx">     int m_suspendMessageCount;
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline ProcessThrottler::ForegroundActivityToken ProcessThrottler::foregroundActivityToken() const
</span><span class="cx"> {
</span><del>-    return ForegroundActivityToken(m_foregroundCounter.token&lt;ForegroundActivityTokenType&gt;());
</del><ins>+    return ForegroundActivityToken(m_foregroundCounter.count());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline ProcessThrottler::BackgroundActivityToken ProcessThrottler::backgroundActivityToken() const
</span><span class="cx"> {
</span><del>-    return BackgroundActivityToken(m_backgroundCounter.token&lt;BackgroundActivityTokenType&gt;());
</del><ins>+    return BackgroundActivityToken(m_backgroundCounter.count());
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -338,12 +338,12 @@
</span><span class="cx"> 
</span><span class="cx">     UserObservablePageToken userObservablePageCount()
</span><span class="cx">     {
</span><del>-        return m_userObservablePageCounter.token&lt;UserObservablePageTokenType&gt;();
</del><ins>+        return m_userObservablePageCounter.count();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ProcessSuppressionDisabledToken processSuppressionDisabledForPageCount()
</span><span class="cx">     {
</span><del>-        return m_processSuppressionDisabledForPageCounter.token&lt;ProcessSuppressionDisabledTokenType&gt;();
</del><ins>+        return m_processSuppressionDisabledForPageCounter.count();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Move these to API::WebsiteDataStore.
</span><span class="lines">@@ -507,8 +507,8 @@
</span><span class="cx"> 
</span><span class="cx">     bool m_memoryCacheDisabled;
</span><span class="cx"> 
</span><del>-    RefCounter m_userObservablePageCounter;
-    RefCounter m_processSuppressionDisabledForPageCounter;
</del><ins>+    UserObservablePageCounter m_userObservablePageCounter;
+    ProcessSuppressionDisabledCounter m_processSuppressionDisabledForPageCounter;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     RetainPtr&lt;NSMutableDictionary&gt; m_bundleParameters;
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Tools/ChangeLog        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-02-25  Gavin Barraclough  &lt;barraclough@apple.com&gt;
+
+        Should template RefCounter instead of RefCounter::Token
+        https://bugs.webkit.org/show_bug.cgi?id=154691
+
+        Reviewed by Anders Carlsson.
+
+        Mechanical update per RefCounter interface change.
+
+        * TestWebKitAPI/Tests/WTF/RefCounter.cpp:
+        (TestWebKitAPI::TEST):
+
</ins><span class="cx"> 2016-02-25  Skachkov Aleksandr  &lt;gskachkov@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed: Add Aleksandr Skachkov as a commiter
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWTFRefCountercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp (197131 => 197132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp        2016-02-25 22:19:06 UTC (rev 197131)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp        2016-02-25 22:24:32 UTC (rev 197132)
</span><span class="lines">@@ -34,8 +34,9 @@
</span><span class="cx"> static const int CallbackExpected = 0xC0FFEE;
</span><span class="cx"> static const int CallbackNotExpected = 0xDECAF;
</span><span class="cx"> 
</span><del>-enum CounterType { };
-typedef RefCounter::Token&lt;CounterType&gt; TokenType;
</del><ins>+enum TestCounterType { };
+typedef RefCounter&lt;TestCounterType&gt; TestCounter;
+typedef TestCounter::Token TokenType;
</ins><span class="cx"> 
</span><span class="cx"> TEST(WTF, RefCounter)
</span><span class="cx"> {
</span><span class="lines">@@ -77,8 +78,8 @@
</span><span class="cx"> 
</span><span class="cx">     {
</span><span class="cx">         // Testing (1a) - Construction with a callback.
</span><del>-        RefCounter* counterPtr = nullptr;
-        RefCounter counter([&amp;](bool value) {
</del><ins>+        TestCounter* counterPtr = nullptr;
+        TestCounter counter([&amp;](bool value) {
</ins><span class="cx">             // Check that the callback is called at the expected times, and the correct number of times.
</span><span class="cx">             EXPECT_EQ(callbackValue, CallbackExpected);
</span><span class="cx">             // Value provided should be equal to the counter value.
</span><span class="lines">@@ -92,7 +93,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Testing (3a) - ref with callback from 0 -&gt; 1.
</span><span class="cx">         callbackValue = CallbackExpected;
</span><del>-        TokenType incTo1(counter.token&lt;CounterType&gt;());
</del><ins>+        TokenType incTo1(counter.count());
</ins><span class="cx">         // Testing (4b) &amp; (4c) - values within &amp; after callback.
</span><span class="cx">         EXPECT_EQ(true, callbackValue);
</span><span class="cx">         EXPECT_EQ(1, static_cast&lt;int&gt;(counter.value()));
</span><span class="lines">@@ -109,7 +110,7 @@
</span><span class="cx"> 
</span><span class="cx">         {
</span><span class="cx">             // Testing (3j) - ref using a Ref rather than a RefPtr.
</span><del>-            TokenType incTo2Again(counter.token&lt;CounterType&gt;());
</del><ins>+            TokenType incTo2Again(counter.count());
</ins><span class="cx">             // Testing (4b) &amp; (4c) - values within &amp; after callback.
</span><span class="cx">             EXPECT_EQ(2, static_cast&lt;int&gt;(counter.value()));
</span><span class="cx">             // Testing (3k) - deref using a Ref rather than a RefPtr.
</span><span class="lines">@@ -124,9 +125,9 @@
</span><span class="cx">         EXPECT_EQ(0, callbackValue);
</span><span class="cx">         EXPECT_EQ(0, static_cast&lt;int&gt;(counter.value()));
</span><span class="cx"> 
</span><del>-        // Testing (2a) - Destruction where the RefCounter::Count has a non-zero reference count.
</del><ins>+        // Testing (2a) - Destruction where the TestCounter::Count has a non-zero reference count.
</ins><span class="cx">         callbackValue = CallbackExpected;
</span><del>-        incTo1Again = counter.token&lt;CounterType&gt;();
</del><ins>+        incTo1Again = counter.count();
</ins><span class="cx">         EXPECT_EQ(1, callbackValue);
</span><span class="cx">         EXPECT_EQ(1, static_cast&lt;int&gt;(counter.value()));
</span><span class="cx">         callbackValue = CallbackNotExpected;
</span><span class="lines">@@ -140,11 +141,11 @@
</span><span class="cx">     incTo2Again = nullptr;
</span><span class="cx"> 
</span><span class="cx">     // Testing (1b) - Construction without a callback.
</span><del>-    RefCounter counter;
</del><ins>+    TestCounter counter;
</ins><span class="cx">     // Testing (4a) - after construction value() is 0.
</span><span class="cx">     EXPECT_EQ(0, static_cast&lt;int&gt;(counter.value()));
</span><span class="cx">     // Testing (3h) - ref without callback
</span><del>-    TokenType incTo1(counter.token&lt;CounterType&gt;());
</del><ins>+    TokenType incTo1(counter.count());
</ins><span class="cx">     // Testing (4c) - value as read after the ref.
</span><span class="cx">     EXPECT_EQ(1, static_cast&lt;int&gt;(counter.value()));
</span><span class="cx">     // Testing (3i) - deref without callback
</span></span></pre>
</div>
</div>

</body>
</html>