<!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>[161999] trunk/Source</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/161999">161999</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-01-14 13:38:38 -0800 (Tue, 14 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Get rid of ThreadRestrictionVerifier
https://bugs.webkit.org/show_bug.cgi?id=127004

Reviewed by Sam Weinig.

Source/WebCore:

Remove now unneeded calls.

* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::defaultIcon):
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::getOrCreateIconRecord):
(WebCore::IconDatabase::readFromDatabase):

Source/WTF:

The ThreadRestrictionVerifier mechanism has been turned off for a while
since it doesn't really have a good solution for objects that are passed between threads.
Instead of having dead code in the tree, just get rid of it.

* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/RefCounted.h:
(WTF::RefCountedBase::ref):
(WTF::RefCountedBase::hasOneRef):
(WTF::RefCountedBase::refCount):
(WTF::RefCountedBase::derefBase):
* wtf/ThreadRestrictionVerifier.h: Removed.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFGNUmakefilelistam">trunk/Source/WTF/GNUmakefile.list.am</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="#trunkSourceWTFwtfRefCountedh">trunk/Source/WTF/wtf/RefCounted.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloadericonIconDatabasecpp">trunk/Source/WebCore/loader/icon/IconDatabase.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWTFwtfThreadRestrictionVerifierh">trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (161998 => 161999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2014-01-14 21:19:12 UTC (rev 161998)
+++ trunk/Source/WTF/ChangeLog        2014-01-14 21:38:38 UTC (rev 161999)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-01-14  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Get rid of ThreadRestrictionVerifier
+        https://bugs.webkit.org/show_bug.cgi?id=127004
+
+        Reviewed by Sam Weinig.
+
+        The ThreadRestrictionVerifier mechanism has been turned off for a while
+        since it doesn't really have a good solution for objects that are passed between threads.
+        Instead of having dead code in the tree, just get rid of it.
+        
+        * GNUmakefile.list.am:
+        * WTF.vcxproj/WTF.vcxproj:
+        * WTF.vcxproj/WTF.vcxproj.filters:
+        * WTF.xcodeproj/project.pbxproj:
+        * wtf/CMakeLists.txt:
+        * wtf/RefCounted.h:
+        (WTF::RefCountedBase::ref):
+        (WTF::RefCountedBase::hasOneRef):
+        (WTF::RefCountedBase::refCount):
+        (WTF::RefCountedBase::derefBase):
+        * wtf/ThreadRestrictionVerifier.h: Removed.
+
</ins><span class="cx"> 2014-01-14  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Enable the experimental selector code generator by default
</span></span></pre></div>
<a id="trunkSourceWTFGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/GNUmakefile.list.am (161998 => 161999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/GNUmakefile.list.am        2014-01-14 21:19:12 UTC (rev 161998)
+++ trunk/Source/WTF/GNUmakefile.list.am        2014-01-14 21:38:38 UTC (rev 161999)
</span><span class="lines">@@ -169,7 +169,6 @@
</span><span class="cx">     Source/WTF/wtf/ThreadFunctionInvocation.h \
</span><span class="cx">     Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp \
</span><span class="cx">     Source/WTF/wtf/ThreadIdentifierDataPthreads.h \
</span><del>-    Source/WTF/wtf/ThreadRestrictionVerifier.h \
</del><span class="cx">     Source/WTF/wtf/ThreadSafeRefCounted.h \
</span><span class="cx">     Source/WTF/wtf/ThreadSpecific.h \
</span><span class="cx">     Source/WTF/wtf/ThreadSpecificWin.cpp \
</span></span></pre></div>
<a id="trunkSourceWTFWTFvcxprojWTFvcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj (161998 => 161999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj        2014-01-14 21:19:12 UTC (rev 161998)
+++ trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj        2014-01-14 21:38:38 UTC (rev 161999)
</span><span class="lines">@@ -295,7 +295,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\text\WTFString.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\Threading.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\ThreadingPrimitives.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\wtf\ThreadRestrictionVerifier.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\threadsafeRefCounted.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\threadspecific.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\threads\BinarySemaphore.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWTFWTFvcxprojWTFvcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters (161998 => 161999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters        2014-01-14 21:19:12 UTC (rev 161998)
+++ trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters        2014-01-14 21:38:38 UTC (rev 161999)
</span><span class="lines">@@ -651,9 +651,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\ThreadingPrimitives.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;wtf&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\wtf\ThreadRestrictionVerifier.h&quot;&gt;
-      &lt;Filter&gt;wtf&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\ValueCheck.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;wtf&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWTFWTFxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (161998 => 161999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2014-01-14 21:19:12 UTC (rev 161998)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2014-01-14 21:38:38 UTC (rev 161999)
</span><span class="lines">@@ -246,7 +246,6 @@
</span><span class="cx">                 A8A4744B151A825B004123FF /* Threading.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47333151A825B004123FF /* Threading.h */; };
</span><span class="cx">                 A8A4744D151A825B004123FF /* ThreadingPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47335151A825B004123FF /* ThreadingPrimitives.h */; };
</span><span class="cx">                 A8A4744E151A825B004123FF /* ThreadingPthreads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A47336151A825B004123FF /* ThreadingPthreads.cpp */; };
</span><del>-                A8A47450151A825B004123FF /* ThreadRestrictionVerifier.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47338151A825B004123FF /* ThreadRestrictionVerifier.h */; };
</del><span class="cx">                 A8A47451151A825B004123FF /* BinarySemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A4733A151A825B004123FF /* BinarySemaphore.cpp */; };
</span><span class="cx">                 A8A47452151A825B004123FF /* BinarySemaphore.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4733B151A825B004123FF /* BinarySemaphore.h */; };
</span><span class="cx">                 A8A47454151A825B004123FF /* ThreadSafeRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4733E151A825B004123FF /* ThreadSafeRefCounted.h */; };
</span><span class="lines">@@ -524,7 +523,6 @@
</span><span class="cx">                 A8A47333151A825B004123FF /* Threading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Threading.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A8A47335151A825B004123FF /* ThreadingPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadingPrimitives.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A8A47336151A825B004123FF /* ThreadingPthreads.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadingPthreads.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A8A47338151A825B004123FF /* ThreadRestrictionVerifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadRestrictionVerifier.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 A8A4733A151A825B004123FF /* BinarySemaphore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BinarySemaphore.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A8A4733B151A825B004123FF /* BinarySemaphore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BinarySemaphore.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A8A4733E151A825B004123FF /* ThreadSafeRefCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSafeRefCounted.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -827,7 +825,6 @@
</span><span class="cx">                                 A8A47333151A825B004123FF /* Threading.h */,
</span><span class="cx">                                 A8A47335151A825B004123FF /* ThreadingPrimitives.h */,
</span><span class="cx">                                 A8A47336151A825B004123FF /* ThreadingPthreads.cpp */,
</span><del>-                                A8A47338151A825B004123FF /* ThreadRestrictionVerifier.h */,
</del><span class="cx">                                 A8A4733E151A825B004123FF /* ThreadSafeRefCounted.h */,
</span><span class="cx">                                 A8A4733F151A825B004123FF /* ThreadSpecific.h */,
</span><span class="cx">                                 149EF16216BBFE0D000A4331 /* TriState.h */,
</span><span class="lines">@@ -1117,7 +1114,6 @@
</span><span class="cx">                                 A8A47449151A825B004123FF /* ThreadIdentifierDataPthreads.h in Headers */,
</span><span class="cx">                                 A8A4744B151A825B004123FF /* Threading.h in Headers */,
</span><span class="cx">                                 A8A4744D151A825B004123FF /* ThreadingPrimitives.h in Headers */,
</span><del>-                                A8A47450151A825B004123FF /* ThreadRestrictionVerifier.h in Headers */,
</del><span class="cx">                                 A8A47454151A825B004123FF /* ThreadSafeRefCounted.h in Headers */,
</span><span class="cx">                                 A8A47455151A825B004123FF /* ThreadSpecific.h in Headers */,
</span><span class="cx">                                 149EF16316BBFE0D000A4331 /* TriState.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWTFwtfCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/CMakeLists.txt (161998 => 161999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/CMakeLists.txt        2014-01-14 21:19:12 UTC (rev 161998)
+++ trunk/Source/WTF/wtf/CMakeLists.txt        2014-01-14 21:38:38 UTC (rev 161999)
</span><span class="lines">@@ -101,7 +101,6 @@
</span><span class="cx">     TCSpinLock.h
</span><span class="cx">     TCSystemAlloc.h
</span><span class="cx">     ThreadIdentifierDataPthreads.h
</span><del>-    ThreadRestrictionVerifier.h
</del><span class="cx">     ThreadSafeRefCounted.h
</span><span class="cx">     ThreadSpecific.h
</span><span class="cx">     Threading.h
</span></span></pre></div>
<a id="trunkSourceWTFwtfRefCountedh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RefCounted.h (161998 => 161999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RefCounted.h        2014-01-14 21:19:12 UTC (rev 161998)
+++ trunk/Source/WTF/wtf/RefCounted.h        2014-01-14 21:38:38 UTC (rev 161999)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> #include &lt;wtf/FastMalloc.h&gt;
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #include &lt;wtf/OwnPtr.h&gt;
</span><del>-#include &lt;wtf/ThreadRestrictionVerifier.h&gt;
</del><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><span class="lines">@@ -43,18 +42,6 @@
</span><span class="cx">     void ref()
</span><span class="cx">     {
</span><span class="cx"> #if CHECK_REF_COUNTED_LIFECYCLE
</span><del>-        // Start thread verification as soon as the ref count gets to 2. This
-        // heuristic reflects the fact that items are often created on one thread
-        // and then given to another thread to be used.
-        // FIXME: Make this restriction tigher. Especially as we move to more
-        // common methods for sharing items across threads like CrossThreadCopier.h
-        // We should be able to add a &quot;detachFromThread&quot; method to make this explicit.
-        if (m_refCount == 1)
-            m_verifier.setShared(true);
-        // If this assert fires, it either indicates a thread safety issue or
-        // that the verification needs to change. See ThreadRestrictionVerifier for
-        // the different modes.
-        ASSERT(m_verifier.isSafeToUse());
</del><span class="cx">         ASSERT(!m_deletionHasBegun);
</span><span class="cx">         ASSERT(!m_adoptionIsRequired);
</span><span class="cx"> #endif
</span><span class="lines">@@ -64,7 +51,6 @@
</span><span class="cx">     bool hasOneRef() const
</span><span class="cx">     {
</span><span class="cx"> #if CHECK_REF_COUNTED_LIFECYCLE
</span><del>-        ASSERT(m_verifier.isSafeToUse());
</del><span class="cx">         ASSERT(!m_deletionHasBegun);
</span><span class="cx"> #endif
</span><span class="cx">         return m_refCount == 1;
</span><span class="lines">@@ -72,35 +58,9 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned refCount() const
</span><span class="cx">     {
</span><del>-#if CHECK_REF_COUNTED_LIFECYCLE
-        ASSERT(m_verifier.isSafeToUse());
-#endif
</del><span class="cx">         return m_refCount;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void setMutexForVerifier(Mutex&amp;);
-
-#if HAVE(DISPATCH_H)
-    void setDispatchQueueForVerifier(dispatch_queue_t);
-#endif
-
-    // Turns off verification. Use of this method is discouraged (instead extend
-    // ThreadRestrictionVerifier to verify your case).
-    // NB. It is necessary to call this in the constructor of many objects in
-    // JavaScriptCore, because JavaScriptCore objects may be used from multiple
-    // threads even if the reference counting is done in a racy manner. This is
-    // because a JSC instance may be used from multiple threads so long as all
-    // accesses into that instance are protected by a per-instance lock. It would
-    // be absolutely wrong to prohibit this pattern, and it would be a disastrous
-    // regression to require that the objects within that instance use a thread-
-    // safe version of reference counting.
-    void turnOffVerifier()
-    {
-#if CHECK_REF_COUNTED_LIFECYCLE
-        m_verifier.turnOffVerification();
-#endif
-    }
-
</del><span class="cx">     void relaxAdoptionRequirement()
</span><span class="cx">     {
</span><span class="cx"> #if CHECK_REF_COUNTED_LIFECYCLE
</span><span class="lines">@@ -132,7 +92,6 @@
</span><span class="cx">     bool derefBase()
</span><span class="cx">     {
</span><span class="cx"> #if CHECK_REF_COUNTED_LIFECYCLE
</span><del>-        ASSERT(m_verifier.isSafeToUse());
</del><span class="cx">         ASSERT(!m_deletionHasBegun);
</span><span class="cx">         ASSERT(!m_adoptionIsRequired);
</span><span class="cx"> #endif
</span><span class="lines">@@ -146,13 +105,6 @@
</span><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         m_refCount = tempRefCount;
</span><del>-
-#if CHECK_REF_COUNTED_LIFECYCLE
-        // Stop thread verification when the ref goes to 1 because it
-        // is safe to be passed to another thread at this point.
-        if (m_refCount == 1)
-            m_verifier.setShared(false);
-#endif
</del><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -173,7 +125,6 @@
</span><span class="cx"> #if CHECK_REF_COUNTED_LIFECYCLE
</span><span class="cx">     bool m_deletionHasBegun;
</span><span class="cx">     bool m_adoptionIsRequired;
</span><del>-    ThreadRestrictionVerifier m_verifier;
</del><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -219,26 +170,6 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-#if CHECK_REF_COUNTED_LIFECYCLE
-inline void RefCountedBase::setMutexForVerifier(Mutex&amp; mutex)
-{
-    m_verifier.setMutexMode(mutex);
-}
-#else
-inline void RefCountedBase::setMutexForVerifier(Mutex&amp;) { }
-#endif
-
-#if HAVE(DISPATCH_H)
-#if CHECK_REF_COUNTED_LIFECYCLE
-inline void RefCountedBase::setDispatchQueueForVerifier(dispatch_queue_t queue)
-{
-    m_verifier.setDispatchQueueMode(queue);
-}
-#else
-inline void RefCountedBase::setDispatchQueueForVerifier(dispatch_queue_t) { }
-#endif
-#endif // HAVE(DISPATCH_H)
-
</del><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span><span class="cx"> using WTF::RefCounted;
</span></span></pre></div>
<a id="trunkSourceWTFwtfThreadRestrictionVerifierh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h (161998 => 161999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h        2014-01-14 21:19:12 UTC (rev 161998)
+++ trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h        2014-01-14 21:38:38 UTC (rev 161999)
</span><span class="lines">@@ -1,214 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google 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:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * 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.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * &quot;AS IS&quot; 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 THE COPYRIGHT
- * OWNER OR 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.
- */
-
-#ifndef ThreadRestrictionVerifier_h
-#define ThreadRestrictionVerifier_h
-
-#include &lt;wtf/Assertions.h&gt;
-#include &lt;wtf/Threading.h&gt;
-#include &lt;wtf/ThreadingPrimitives.h&gt;
-
-#if HAVE(DISPATCH_H)
-#include &lt;dispatch/dispatch.h&gt;
-#endif
-
-#ifndef NDEBUG
-
-namespace WTF {
-
-// Verifies that a class is used in a way that respects its lack of thread-safety.
-// The default mode is to verify that the object will only be used on a single thread. The
-// thread gets captured when setShared(true) is called.
-// The mode may be changed by calling useMutexMode (or turnOffVerification).
-
-// FIXME: This verifier is switched off because it fires false positives for
-// objects that are used on multiple threads. Instead of an opt-out verifier,
-// we probably need an opt-in verifier that marks select objects as being
-// tied to select threads.
-#if 0
-class ThreadRestrictionVerifier {
-public:
-    ThreadRestrictionVerifier()
-        : m_mode(SingleThreadVerificationMode)
-        , m_shared(false)
-        , m_owningThread(0)
-        , m_mutex(0)
-#if HAVE(DISPATCH_H)
-        , m_owningQueue(0)
-#endif
-    {
-    }
-
-#if HAVE(DISPATCH_H)
-    ~ThreadRestrictionVerifier()
-    {
-        if (m_owningQueue)
-            dispatch_release(m_owningQueue);
-    }
-#endif
-
-    void setMutexMode(Mutex&amp; mutex)
-    {
-        m_mode = MutexVerificationMode;
-        m_mutex = &amp;mutex;
-    }
-
-#if HAVE(DISPATCH_H)
-    void setDispatchQueueMode(dispatch_queue_t queue)
-    {
-        m_mode = SingleDispatchQueueVerificationMode;
-        m_owningQueue = queue;
-        dispatch_retain(m_owningQueue);
-    }
-#endif
-
-    void turnOffVerification()
-    {
-        m_mode = NoVerificationMode;
-    }
-
-    // Indicates that the object may (or may not) be owned by more than one place.
-    void setShared(bool shared)
-    {
-#if !ASSERT_DISABLED
-        bool previouslyShared = m_shared;
-#endif
-        m_shared = shared;
-
-        if (!m_shared)
-            return;
-
-        switch (m_mode) {
-        case SingleThreadVerificationMode:
-            ASSERT(shared != previouslyShared);
-            // Capture the current thread to verify that subsequent ref/deref happen on this thread.
-            m_owningThread = currentThread();
-            return;
-
-#if HAVE(DISPATCH_H)
-        case SingleDispatchQueueVerificationMode:
-#endif
-        case MutexVerificationMode:
-        case NoVerificationMode:
-            return;
-        }
-        ASSERT_NOT_REACHED();
-    }
-
-    // Is it OK to use the object at this moment on the current thread?
-    bool isSafeToUse() const
-    {
-        if (!m_shared)
-            return true;
-
-        switch (m_mode) {
-        case SingleThreadVerificationMode:
-            return m_owningThread == currentThread();
-
-        case MutexVerificationMode:
-            if (!m_mutex-&gt;tryLock())
-                return true;
-            m_mutex-&gt;unlock();
-            return false;
-
-#if HAVE(DISPATCH_H)
-        case SingleDispatchQueueVerificationMode:
-            return m_owningQueue == dispatch_get_current_queue();
-#endif
-
-        case NoVerificationMode:
-            return true;
-        }
-        ASSERT_NOT_REACHED();
-        return true;
-    }
-
-private:
-    enum VerificationMode {
-        SingleThreadVerificationMode,
-        MutexVerificationMode,
-        NoVerificationMode,
-#if HAVE(DISPATCH_H)
-        SingleDispatchQueueVerificationMode,
-#endif
-    };
-
-    VerificationMode m_mode;
-    bool m_shared;
-
-    // Used by SingleThreadVerificationMode
-    ThreadIdentifier m_owningThread;
-
-    // Used by MutexVerificationMode.
-    Mutex* m_mutex;
-
-#if HAVE(DISPATCH_H)
-    // Used by SingleDispatchQueueVerificationMode.
-    dispatch_queue_t m_owningQueue;
-#endif
-};
-#else
-class ThreadRestrictionVerifier {
-public:
-    ThreadRestrictionVerifier()
-    {
-    }
-
-    void setMutexMode(Mutex&amp;)
-    {
-    }
-
-#if HAVE(DISPATCH_H)
-    void setDispatchQueueMode(dispatch_queue_t)
-    {
-    }
-#endif
-
-    void turnOffVerification()
-    {
-    }
-
-    // Indicates that the object may (or may not) be owned by more than one place.
-    void setShared(bool)
-    {
-    }
-
-    // Is it OK to use the object at this moment on the current thread?
-    bool isSafeToUse() const
-    {
-        return true;
-    }
-};
-#endif
-
-}
-
-#endif
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161998 => 161999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-14 21:19:12 UTC (rev 161998)
+++ trunk/Source/WebCore/ChangeLog        2014-01-14 21:38:38 UTC (rev 161999)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-01-14  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Get rid of ThreadRestrictionVerifier
+        https://bugs.webkit.org/show_bug.cgi?id=127004
+
+        Reviewed by Sam Weinig.
+
+        Remove now unneeded calls.
+
+        * loader/icon/IconDatabase.cpp:
+        (WebCore::IconDatabase::defaultIcon):
+        (WebCore::IconDatabase::setIconDataForIconURL):
+        (WebCore::IconDatabase::getOrCreateIconRecord):
+        (WebCore::IconDatabase::readFromDatabase):
+
</ins><span class="cx"> 2014-01-14  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Directly allocate NSMutableDictionary in QLPreviewConverterDictionary() and QLContentDictionary()
</span></span></pre></div>
<a id="trunkSourceWebCoreloadericonIconDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/icon/IconDatabase.cpp (161998 => 161999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/icon/IconDatabase.cpp        2014-01-14 21:19:12 UTC (rev 161998)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.cpp        2014-01-14 21:38:38 UTC (rev 161999)
</span><span class="lines">@@ -402,7 +402,6 @@
</span><span class="cx">     
</span><span class="cx">     if (!m_defaultIconRecord) {
</span><span class="cx">         m_defaultIconRecord = IconRecord::create(&quot;urlIcon&quot;);
</span><del>-        m_defaultIconRecord-&gt;setMutexForVerifier(m_urlAndIconLock);
</del><span class="cx">         loadDefaultIconRecord(m_defaultIconRecord.get());
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -544,8 +543,6 @@
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     RefPtr&lt;SharedBuffer&gt; data = dataOriginal ? dataOriginal-&gt;copy() : PassRefPtr&lt;SharedBuffer&gt;(0);
</span><del>-    if (data)
-        data-&gt;setMutexForVerifier(m_urlAndIconLock);
</del><span class="cx">     String iconURL = iconURLOriginal.isolatedCopy();
</span><span class="cx">     
</span><span class="cx">     Vector&lt;String&gt; pageURLs;
</span><span class="lines">@@ -909,7 +906,6 @@
</span><span class="cx">         return icon;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;IconRecord&gt; newIcon = IconRecord::create(iconURL);
</span><del>-    newIcon-&gt;setMutexForVerifier(m_urlAndIconLock);
</del><span class="cx">     m_iconURLToRecordMap.set(iconURL, newIcon.get());
</span><span class="cx"> 
</span><span class="cx">     return newIcon.release();
</span><span class="lines">@@ -1506,7 +1502,6 @@
</span><span class="cx">     for (unsigned i = 0; i &lt; icons.size(); ++i) {
</span><span class="cx">         didAnyWork = true;
</span><span class="cx">         RefPtr&lt;SharedBuffer&gt; imageData = getImageDataForIconURLFromSQLDatabase(icons[i]-&gt;iconURL());
</span><del>-        imageData-&gt;setMutexForVerifier(m_urlAndIconLock);
</del><span class="cx"> 
</span><span class="cx">         // Verify this icon still wants to be read from disk
</span><span class="cx">         {
</span></span></pre>
</div>
</div>

</body>
</html>