<!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>[151663] 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/151663">151663</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2013-06-17 18:08:33 -0700 (Mon, 17 Jun 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Initialize AtomicStringTable in WTFThreadData's constructor
https://bugs.webkit.org/show_bug.cgi?id=117671

Reviewed by Geoffrey Garen.

Extracted AtomicStringTable from AtomicString.cpp into AtomicStringTable.h/cpp
and made WTFThreadDada::WTFThreadData create the atomic string table for the thread.

This eliminates a branch from stringTable() in AtomicString.cpp.

* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/text/AtomicString.cpp:
(WTF::stringTable):
* wtf/text/AtomicStringTable.cpp: Added.
(WTF::AtomicStringTable::create):
(WTF::AtomicStringTable::destroy):
* wtf/text/AtomicStringTable.h: Added.
(WTF::AtomicStringTable::table):</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="#trunkSourceWTFWTFpro">trunk/Source/WTF/WTF.pro</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="#trunkSourceWTFwtfWTFThreadDatacpp">trunk/Source/WTF/wtf/WTFThreadData.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextAtomicStringcpp">trunk/Source/WTF/wtf/text/AtomicString.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWTFwtftextAtomicStringTablecpp">trunk/Source/WTF/wtf/text/AtomicStringTable.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextAtomicStringTableh">trunk/Source/WTF/wtf/text/AtomicStringTable.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (151662 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2013-06-18 00:54:50 UTC (rev 151662)
+++ trunk/Source/WTF/ChangeLog        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2013-06-17  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Initialize AtomicStringTable in WTFThreadData's constructor
+        https://bugs.webkit.org/show_bug.cgi?id=117671
+
+        Reviewed by Geoffrey Garen.
+
+        Extracted AtomicStringTable from AtomicString.cpp into AtomicStringTable.h/cpp
+        and made WTFThreadDada::WTFThreadData create the atomic string table for the thread.
+
+        This eliminates a branch from stringTable() in AtomicString.cpp.
+
+        * GNUmakefile.list.am:
+        * WTF.pro:
+        * WTF.vcxproj/WTF.vcxproj:
+        * WTF.vcxproj/WTF.vcxproj.filters:
+        * WTF.xcodeproj/project.pbxproj:
+        * wtf/CMakeLists.txt:
+        * wtf/WTFThreadData.cpp:
+        (WTF::WTFThreadData::WTFThreadData):
+        * wtf/text/AtomicString.cpp:
+        (WTF::stringTable):
+        * wtf/text/AtomicStringTable.cpp: Added.
+        (WTF::AtomicStringTable::create):
+        (WTF::AtomicStringTable::destroy):
+        * wtf/text/AtomicStringTable.h: Added.
+        (WTF::AtomicStringTable::table):
+
</ins><span class="cx"> 2013-06-17  Roger Fong  &lt;roger_fong@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Modify Windows makefiles to copy some bin output into Program Files.
</span></span></pre></div>
<a id="trunkSourceWTFGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/GNUmakefile.list.am (151662 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/GNUmakefile.list.am        2013-06-18 00:54:50 UTC (rev 151662)
+++ trunk/Source/WTF/GNUmakefile.list.am        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -225,6 +225,8 @@
</span><span class="cx">     Source/WTF/wtf/text/AtomicString.h \
</span><span class="cx">     Source/WTF/wtf/text/AtomicStringHash.h \
</span><span class="cx">     Source/WTF/wtf/text/AtomicStringImpl.h \
</span><ins>+    Source/WTF/wtf/text/AtomicStringTable.cpp \
+    Source/WTF/wtf/text/AtomicStringTable.h \
</ins><span class="cx">     Source/WTF/wtf/text/Base64.cpp \
</span><span class="cx">     Source/WTF/wtf/text/Base64.h \
</span><span class="cx">     Source/WTF/wtf/text/CString.cpp \
</span></span></pre></div>
<a id="trunkSourceWTFWTFpro"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.pro (151662 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.pro        2013-06-18 00:54:50 UTC (rev 151662)
+++ trunk/Source/WTF/WTF.pro        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -144,6 +144,7 @@
</span><span class="cx">     text/AtomicString.h \
</span><span class="cx">     text/AtomicStringHash.h \
</span><span class="cx">     text/AtomicStringImpl.h \
</span><ins>+    text/AtomicStringTable.h \
</ins><span class="cx">     text/Base64.h \
</span><span class="cx">     text/CString.h \
</span><span class="cx">     text/IntegerToStringConversion.h \
</span><span class="lines">@@ -233,6 +234,7 @@
</span><span class="cx">     TypeTraits.cpp \
</span><span class="cx">     WTFThreadData.cpp \
</span><span class="cx">     text/AtomicString.cpp \
</span><ins>+    text/AtomicStringTable.cpp \
</ins><span class="cx">     text/Base64.cpp \
</span><span class="cx">     text/CString.cpp \
</span><span class="cx">     text/StringBuilder.cpp \
</span></span></pre></div>
<a id="trunkSourceWTFWTFvcxprojWTFvcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj (151662 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj        2013-06-18 00:54:50 UTC (rev 151662)
+++ trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\StringPrintStream.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\TCSystemAlloc.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\text\AtomicString.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\wtf\text\AtomicStringTable.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\text\Base64.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\text\CString.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\wtf\text\StringBuilder.cpp&quot; /&gt;
</span><span class="lines">@@ -223,6 +224,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\text\AtomicString.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\text\AtomicStringHash.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\text\AtomicStringImpl.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\wtf\text\AtomicStringTable.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\text\Base64.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\text\CString.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\text\IntegerToStringConversion.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWTFWTFvcxprojWTFvcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters (151662 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters        2013-06-18 00:54:50 UTC (rev 151662)
+++ trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -261,6 +261,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\text\AtomicStringImpl.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;text&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\wtf\text\AtomicStringTable.h&quot;&gt;
+      &lt;Filter&gt;text&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\text\Base64.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;text&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 (151662 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2013-06-18 00:54:50 UTC (rev 151662)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -54,6 +54,8 @@
</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">                 974CFC8E16A4F327006D5404 /* WeakPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 974CFC8D16A4F327006D5404 /* WeakPtr.h */; };
</span><ins>+                9BC70F05176C379D00101DEC /* AtomicStringTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9BC70F04176C379D00101DEC /* AtomicStringTable.cpp */; };
+                9BD8F40B176C2B470002D865 /* AtomicStringTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BD8F40A176C2AD80002D865 /* AtomicStringTable.h */; };
</ins><span class="cx">                 A876DBD8151816E500DADB95 /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A876DBD7151816E500DADB95 /* Platform.h */; };
</span><span class="cx">                 A8A4737F151A825B004123FF /* Alignment.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47254151A825A004123FF /* Alignment.h */; };
</span><span class="cx">                 A8A47381151A825B004123FF /* ArrayBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A47256151A825A004123FF /* ArrayBuffer.cpp */; };
</span><span class="lines">@@ -323,6 +325,8 @@
</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">                 974CFC8D16A4F327006D5404 /* WeakPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakPtr.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                9BC70F04176C379D00101DEC /* AtomicStringTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicStringTable.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                9BD8F40A176C2AD80002D865 /* AtomicStringTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AtomicStringTable.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A876DBD7151816E500DADB95 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Platform.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A8A47254151A825A004123FF /* Alignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Alignment.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A8A47256151A825A004123FF /* ArrayBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayBuffer.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -845,6 +849,8 @@
</span><span class="cx">                                 A8A4731E151A825B004123FF /* AtomicString.h */,
</span><span class="cx">                                 A8A4731F151A825B004123FF /* AtomicStringHash.h */,
</span><span class="cx">                                 A8A47320151A825B004123FF /* AtomicStringImpl.h */,
</span><ins>+                                9BD8F40A176C2AD80002D865 /* AtomicStringTable.h */,
+                                9BC70F04176C379D00101DEC /* AtomicStringTable.cpp */,
</ins><span class="cx">                                 8134013615B092FD001FF0B8 /* Base64.cpp */,
</span><span class="cx">                                 8134013715B092FD001FF0B8 /* Base64.h */,
</span><span class="cx">                                 A8A47321151A825B004123FF /* CString.cpp */,
</span><span class="lines">@@ -914,6 +920,7 @@
</span><span class="cx">                                 1469419216EAAF6D0024E146 /* RunLoopTimer.h in Headers */,
</span><span class="cx">                                 1469419616EAAFF80024E146 /* SchedulePair.h in Headers */,
</span><span class="cx">                                 A8A47385151A825B004123FF /* ASCIICType.h in Headers */,
</span><ins>+                                9BD8F40B176C2B470002D865 /* AtomicStringTable.h in Headers */,
</ins><span class="cx">                                 A8A47434151A825B004123FF /* ASCIIFastPath.h in Headers */,
</span><span class="cx">                                 A8A47387151A825B004123FF /* Assertions.h in Headers */,
</span><span class="cx">                                 A8A47388151A825B004123FF /* Atomics.h in Headers */,
</span><span class="lines">@@ -1227,6 +1234,7 @@
</span><span class="cx">                                 A8A47458151A825B004123FF /* TypeTraits.cpp in Sources */,
</span><span class="cx">                                 A8A47469151A825B004123FF /* UTF8.cpp in Sources */,
</span><span class="cx">                                 A8A47445151A825B004123FF /* WTFString.cpp in Sources */,
</span><ins>+                                9BC70F05176C379D00101DEC /* AtomicStringTable.cpp in Sources */,
</ins><span class="cx">                                 A8A47486151A825B004123FF /* WTFThreadData.cpp in Sources */,
</span><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span></span></pre></div>
<a id="trunkSourceWTFwtfCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/CMakeLists.txt (151662 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/CMakeLists.txt        2013-06-18 00:54:50 UTC (rev 151662)
+++ trunk/Source/WTF/wtf/CMakeLists.txt        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -126,6 +126,7 @@
</span><span class="cx"> 
</span><span class="cx">     text/AtomicString.h
</span><span class="cx">     text/AtomicStringImpl.h
</span><ins>+    text/AtomicStringTable.h
</ins><span class="cx">     text/Base64.h
</span><span class="cx">     text/CString.h
</span><span class="cx">     text/IntegerToStringConversion.h
</span><span class="lines">@@ -192,6 +193,7 @@
</span><span class="cx">     dtoa/strtod.cc
</span><span class="cx"> 
</span><span class="cx">     text/AtomicString.cpp
</span><ins>+    text/AtomicStringTable.cpp
</ins><span class="cx">     text/Base64.cpp
</span><span class="cx">     text/CString.cpp
</span><span class="cx">     text/StringBuilder.cpp
</span></span></pre></div>
<a id="trunkSourceWTFwtfWTFThreadDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/WTFThreadData.cpp (151662 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/WTFThreadData.cpp        2013-06-18 00:54:50 UTC (rev 151662)
+++ trunk/Source/WTF/wtf/WTFThreadData.cpp        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -27,6 +27,8 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;WTFThreadData.h&quot;
</span><span class="cx"> 
</span><ins>+#include &lt;wtf/text/AtomicStringTable.h&gt;
+
</ins><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><span class="cx"> ThreadSpecific&lt;WTFThreadData&gt;* WTFThreadData::staticData;
</span><span class="lines">@@ -42,6 +44,7 @@
</span><span class="cx">     , m_stackStats()
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><ins>+    AtomicStringTable::create(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WTFThreadData::~WTFThreadData()
</span></span></pre></div>
<a id="trunkSourceWTFwtftextAtomicStringcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/AtomicString.cpp (151662 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/AtomicString.cpp        2013-06-18 00:54:50 UTC (rev 151662)
+++ trunk/Source/WTF/wtf/text/AtomicString.cpp        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;AtomicString.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;AtomicStringTable.h&quot;
</ins><span class="cx"> #include &quot;StringHash.h&quot;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="cx"> #include &lt;wtf/Threading.h&gt;
</span><span class="lines">@@ -64,57 +65,9 @@
</span><span class="cx"> };
</span><span class="cx"> #endif // USE(WEB_THREAD)
</span><span class="cx"> 
</span><del>-class AtomicStringTable {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    static AtomicStringTable* create(WTFThreadData&amp; data)
-    {
-#if USE(WEB_THREAD)
-        // On iOS, one AtomicStringTable is shared between the main UI thread and the WebThread.
-        static AtomicStringTable* sharedStringTable = new AtomicStringTable;
-
-        bool currentThreadIsWebThread = isWebThread();
-        if (currentThreadIsWebThread || isUIThread())
-            data.m_atomicStringTable = sharedStringTable;
-        else
-            data.m_atomicStringTable = new AtomicStringTable;
-
-        // We do the following so that its destruction happens only
-        // once - on the main UI thread.
-        if (!currentThreadIsWebThread)
-            data.m_atomicStringTableDestructor = AtomicStringTable::destroy;
-#else
-        data.m_atomicStringTable = new AtomicStringTable;
-        data.m_atomicStringTableDestructor = AtomicStringTable::destroy;
-#endif // USE(WEB_THREAD)
-        return data.m_atomicStringTable;
-    }
-
-    HashSet&lt;StringImpl*&gt;&amp; table()
-    {
-        return m_table;
-    }
-
-private:
-    static void destroy(AtomicStringTable* table)
-    {
-        HashSet&lt;StringImpl*&gt;::iterator end = table-&gt;m_table.end();
-        for (HashSet&lt;StringImpl*&gt;::iterator iter = table-&gt;m_table.begin(); iter != end; ++iter)
-            (*iter)-&gt;setIsAtomic(false);
-        delete table;
-    }
-
-    HashSet&lt;StringImpl*&gt; m_table;
-};
-
-static inline HashSet&lt;StringImpl*&gt;&amp; stringTable()
</del><ins>+static ALWAYS_INLINE HashSet&lt;StringImpl*&gt;&amp; stringTable()
</ins><span class="cx"> {
</span><del>-    // Once possible we should make this non-lazy (constructed in WTFThreadData's constructor).
-    WTFThreadData&amp; data = wtfThreadData();
-    AtomicStringTable* table = data.atomicStringTable();
-    if (UNLIKELY(!table))
-        table = AtomicStringTable::create(data);
-    return table-&gt;table();
</del><ins>+    return wtfThreadData().atomicStringTable()-&gt;table();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename T, typename HashTranslator&gt;
</span></span></pre></div>
<a id="trunkSourceWTFwtftextAtomicStringTablecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WTF/wtf/text/AtomicStringTable.cpp (0 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/AtomicStringTable.cpp                                (rev 0)
+++ trunk/Source/WTF/wtf/text/AtomicStringTable.cpp        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+/*
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Patrick Gansterer &lt;paroga@paroga.com&gt;
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include &quot;config.h&quot;
+#include &quot;AtomicStringTable.h&quot;
+
+#include &lt;wtf/HashSet.h&gt;
+#include &lt;wtf/WTFThreadData.h&gt;
+
+namespace WTF {
+
+void AtomicStringTable::create(WTFThreadData&amp; data)
+{
+#if USE(WEB_THREAD)
+    // On iOS, one AtomicStringTable is shared between the main UI thread and the WebThread.
+    static AtomicStringTable* sharedStringTable = new AtomicStringTable;
+
+    bool currentThreadIsWebThread = isWebThread();
+    if (currentThreadIsWebThread || isUIThread())
+        data.m_atomicStringTable = sharedStringTable;
+    else
+        data.m_atomicStringTable = new AtomicStringTable;
+
+    // We do the following so that its destruction happens only
+    // once - on the main UI thread.
+    if (!currentThreadIsWebThread)
+        data.m_atomicStringTableDestructor = destroyAtomicStringTable;
+#else
+    data.m_atomicStringTable = new AtomicStringTable;
+    data.m_atomicStringTableDestructor = AtomicStringTable::destroy;
+#endif // USE(WEB_THREAD)
+}
+
+void AtomicStringTable::destroy(AtomicStringTable* table)
+{
+    HashSet&lt;StringImpl*&gt;::iterator end = table-&gt;m_table.end();
+    for (HashSet&lt;StringImpl*&gt;::iterator iter = table-&gt;m_table.begin(); iter != end; ++iter)
+        (*iter)-&gt;setIsAtomic(false);
+    delete table;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWTFwtftextAtomicStringTableh"></a>
<div class="addfile"><h4>Added: trunk/Source/WTF/wtf/text/AtomicStringTable.h (0 => 151663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/AtomicStringTable.h                                (rev 0)
+++ trunk/Source/WTF/wtf/text/AtomicStringTable.h        2013-06-18 01:08:33 UTC (rev 151663)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Patrick Gansterer &lt;paroga@paroga.com&gt;
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef WTF_AtomicStringTable_h
+#define WTF_AtomicStringTable_h
+
+#include &lt;wtf/HashSet.h&gt;
+#include &lt;wtf/WTFThreadData.h&gt;
+
+namespace WTF {
+
+class StringImpl;
+
+class AtomicStringTable {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+
+    static void create(WTFThreadData&amp;);
+    HashSet&lt;StringImpl*&gt;&amp; table() { return m_table; }
+
+private:
+    static void destroy(AtomicStringTable*);
+
+    HashSet&lt;StringImpl*&gt; m_table;
+};
+
+}
+
+#endif
</ins></span></pre>
</div>
</div>

</body>
</html>