<!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>[162787] trunk/Source/WebCore</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/162787">162787</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2014-01-25 16:36:23 -0800 (Sat, 25 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove some iOS #ifdefs by adding SQLiteDatabaseTracker to all the builds
https://bugs.webkit.org/show_bug.cgi?id=127632

Reviewed by Darin Adler.

Move the SQLiteDatabaseTracker and client from platform/sql/ios to platform/sql,
as there is nothing iOS specific about it. Then, un-#ifdef all its uses. For
ports that don't setup a client, this has no change in behavior.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/webdatabase/DatabaseBackendBase.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* loader/appcache/ApplicationCacheStorage.cpp:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::sendWillRevealEdgeEventsIfNeeded):
* platform/sql/SQLiteDatabaseTracker.cpp: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTracker.cpp.
* platform/sql/SQLiteDatabaseTracker.h: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTracker.h.
* platform/sql/SQLiteDatabaseTrackerClient.h: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTrackerClient.h.
* platform/sql/ios: Removed.
* platform/sql/ios/SQLiteDatabaseTracker.cpp: Removed.
* platform/sql/ios/SQLiteDatabaseTracker.h: Removed.
* platform/sql/ios/SQLiteDatabaseTrackerClient.h: Removed.
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::openDatabase):
(WebCore::StorageAreaSync::sync):
* storage/StorageTracker.cpp:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefilelistam">trunk/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseBackendBasecpp">trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreloaderappcacheApplicationCacheStoragecpp">trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollableAreah">trunk/Source/WebCore/platform/ScrollableArea.h</a></li>
<li><a href="#trunkSourceWebCorestorageStorageAreaSynccpp">trunk/Source/WebCore/storage/StorageAreaSync.cpp</a></li>
<li><a href="#trunkSourceWebCorestorageStorageTrackercpp">trunk/Source/WebCore/storage/StorageTracker.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformsqlSQLiteDatabaseTrackercpp">trunk/Source/WebCore/platform/sql/SQLiteDatabaseTracker.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformsqlSQLiteDatabaseTrackerh">trunk/Source/WebCore/platform/sql/SQLiteDatabaseTracker.h</a></li>
<li><a href="#trunkSourceWebCoreplatformsqlSQLiteDatabaseTrackerClienth">trunk/Source/WebCore/platform/sql/SQLiteDatabaseTrackerClient.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li>trunk/Source/WebCore/platform/sql/ios/</li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -2057,6 +2057,7 @@
</span><span class="cx">     platform/sql/SQLValue.cpp
</span><span class="cx">     platform/sql/SQLiteAuthorizer.cpp
</span><span class="cx">     platform/sql/SQLiteDatabase.cpp
</span><ins>+    platform/sql/SQLiteDatabaseTracker.cpp
</ins><span class="cx">     platform/sql/SQLiteFileSystem.cpp
</span><span class="cx">     platform/sql/SQLiteStatement.cpp
</span><span class="cx">     platform/sql/SQLiteTransaction.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/ChangeLog        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2014-01-25  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Remove some iOS #ifdefs by adding SQLiteDatabaseTracker to all the builds
+        https://bugs.webkit.org/show_bug.cgi?id=127632
+
+        Reviewed by Darin Adler.
+
+        Move the SQLiteDatabaseTracker and client from platform/sql/ios to platform/sql,
+        as there is nothing iOS specific about it. Then, un-#ifdef all its uses. For
+        ports that don't setup a client, this has no change in behavior.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Modules/webdatabase/DatabaseBackendBase.cpp:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/appcache/ApplicationCacheStorage.cpp:
+        * platform/ScrollableArea.h:
+        (WebCore::ScrollableArea::sendWillRevealEdgeEventsIfNeeded):
+        * platform/sql/SQLiteDatabaseTracker.cpp: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTracker.cpp.
+        * platform/sql/SQLiteDatabaseTracker.h: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTracker.h.
+        * platform/sql/SQLiteDatabaseTrackerClient.h: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTrackerClient.h.
+        * platform/sql/ios: Removed.
+        * platform/sql/ios/SQLiteDatabaseTracker.cpp: Removed.
+        * platform/sql/ios/SQLiteDatabaseTracker.h: Removed.
+        * platform/sql/ios/SQLiteDatabaseTrackerClient.h: Removed.
+        * storage/StorageAreaSync.cpp:
+        (WebCore::StorageAreaSync::openDatabase):
+        (WebCore::StorageAreaSync::sync):
+        * storage/StorageTracker.cpp:
+
</ins><span class="cx"> 2014-01-25  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove an unused FrameLoaderClient function
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -5478,6 +5478,9 @@
</span><span class="cx">         Source/WebCore/platform/sql/SQLiteAuthorizer.cpp \
</span><span class="cx">         Source/WebCore/platform/sql/SQLiteDatabase.cpp \
</span><span class="cx">         Source/WebCore/platform/sql/SQLiteDatabase.h \
</span><ins>+        Source/WebCore/platform/sql/SQLiteDatabaseTracker.cpp \
+        Source/WebCore/platform/sql/SQLiteDatabaseTracker.h \
+        Source/WebCore/platform/sql/SQLiteDatabaseTrackerClient.h \
</ins><span class="cx">         Source/WebCore/platform/sql/SQLiteFileSystem.cpp \
</span><span class="cx">         Source/WebCore/platform/sql/SQLiteFileSystem.h \
</span><span class="cx">         Source/WebCore/platform/sql/SQLiteStatement.cpp \
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseBackendBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include &quot;DatabaseTracker.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><ins>+#include &quot;SQLiteDatabaseTracker.h&quot;
</ins><span class="cx"> #include &quot;SQLiteStatement.h&quot;
</span><span class="cx"> #include &quot;SQLiteTransaction.h&quot;
</span><span class="cx"> #include &quot;SecurityOrigin.h&quot;
</span><span class="lines">@@ -52,10 +53,6 @@
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringHash.h&gt;
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-#include &quot;SQLiteDatabaseTracker.h&quot;
-#endif
-
</del><span class="cx"> // Registering &quot;opened&quot; databases with the DatabaseTracker
</span><span class="cx"> // =======================================================
</span><span class="cx"> // The DatabaseTracker maintains a list of databases that have been
</span><span class="lines">@@ -332,9 +329,10 @@
</span><span class="cx">         // Make sure we wait till the background removal of the empty database files finished before trying to open any database.
</span><span class="cx">         MutexLocker locker(DatabaseTracker::openDatabaseMutex());
</span><span class="cx">     }
</span><del>-    SQLiteTransactionInProgressAutoCounter transactionCounter;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    SQLiteTransactionInProgressAutoCounter transactionCounter;
+
</ins><span class="cx">     if (!m_sqliteDatabase.open(m_filename, true)) {
</span><span class="cx">         errorMessage = formatErrorMessage(&quot;unable to open database&quot;, m_sqliteDatabase.lastError(), m_sqliteDatabase.lastErrorMsg());
</span><span class="cx">         return false;
</span><span class="lines">@@ -587,9 +585,8 @@
</span><span class="cx"> 
</span><span class="cx"> void DatabaseBackendBase::incrementalVacuumIfNeeded()
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     int64_t freeSpaceSize = m_sqliteDatabase.freeSpaceSize();
</span><span class="cx">     int64_t totalSize = m_sqliteDatabase.totalSize();
</span><span class="cx">     if (totalSize &lt;= 10 * freeSpaceSize) {
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -8454,6 +8454,7 @@
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\sql\SQLiteAuthorizer.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\sql\SQLiteDatabase.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\sql\SQLiteDatabaseTracker.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\sql\SQLiteFileSystem.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\sql\SQLiteStatement.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\sql\SQLiteTransaction.cpp&quot; /&gt;
</span><span class="lines">@@ -19510,6 +19511,8 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/CustomBuildStep&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\sql\SQLiteDatabase.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\platform\sql\SQLiteDatabaseTracker.h&quot; /&gt;
+    &lt;ClInclude Include=&quot;..\platform\sql\SQLiteDatabaseTrackerClient.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\platform\sql\SQLiteFileSystem.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\sql\SQLiteStatement.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\sql\SQLiteTransaction.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -1923,6 +1923,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\sql\SQLiteDatabase.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\sql&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\sql\SQLiteDatabaseTracker.cpp&quot;&gt;
+      &lt;Filter&gt;platform\sql&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\sql\SQLiteFileSystem.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\sql&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -8699,6 +8702,12 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\sql\SQLiteDatabase.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\sql&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\platform\sql\SQLiteDatabaseTracker.h&quot;&gt;
+      &lt;Filter&gt;platform\sql&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
+    &lt;ClInclude Include=&quot;..\platform\sql\SQLiteDatabaseTrackerClient.h&quot;&gt;
+      &lt;Filter&gt;platform\sql&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\platform\sql\SQLiteFileSystem.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\sql&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -9234,9 +9234,9 @@
</span><span class="cx">                 7E428CE413E3407F003B661C /* ResourceHandleIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceHandleIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7E46F6F81627A2C900062223 /* JSOESElementIndexUint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESElementIndexUint.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7E46F6F91627A2C900062223 /* JSOESElementIndexUint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESElementIndexUint.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteDatabaseTrackerClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                7E474E1C12494DC900235364 /* SQLiteDatabaseTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteDatabaseTracker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                7E474E1D12494DC900235364 /* SQLiteDatabaseTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SQLiteDatabaseTracker.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteDatabaseTrackerClient.h; path = sql/SQLiteDatabaseTrackerClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7E474E1C12494DC900235364 /* SQLiteDatabaseTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteDatabaseTracker.h; path = sql/SQLiteDatabaseTracker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7E474E1D12494DC900235364 /* SQLiteDatabaseTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLiteDatabaseTracker.cpp; path = sql/SQLiteDatabaseTracker.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 7E5D7A73161D3F8F00896C34 /* OESElementIndexUint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OESElementIndexUint.cpp; path = canvas/OESElementIndexUint.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7E5D7A74161D3F8F00896C34 /* OESElementIndexUint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OESElementIndexUint.h; path = canvas/OESElementIndexUint.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7E66E23116D6EB6C00F7E7FF /* WebGLCompressedTextureATC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLCompressedTextureATC.cpp; path = canvas/WebGLCompressedTextureATC.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -14510,7 +14510,9 @@
</span><span class="cx">                 1A2E6E560CC551E0004A2062 /* sql */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                7E474E1912494DA900235364 /* ios */,
</del><ins>+                                7E474E1D12494DC900235364 /* SQLiteDatabaseTracker.cpp */,
+                                7E474E1C12494DC900235364 /* SQLiteDatabaseTracker.h */,
+                                7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */,
</ins><span class="cx">                                 1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */,
</span><span class="cx">                                 1A2246430CC98DDB00C05240 /* SQLiteDatabase.cpp */,
</span><span class="cx">                                 1A2246440CC98DDB00C05240 /* SQLiteDatabase.h */,
</span><span class="lines">@@ -16209,17 +16211,6 @@
</span><span class="cx">                         path = icu;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><del>-                7E474E1912494DA900235364 /* ios */ = {
-                        isa = PBXGroup;
-                        children = (
-                                7E474E1D12494DC900235364 /* SQLiteDatabaseTracker.cpp */,
-                                7E474E1C12494DC900235364 /* SQLiteDatabaseTracker.h */,
-                                7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */,
-                        );
-                        name = ios;
-                        path = sql/ios;
-                        sourceTree = &quot;&lt;group&gt;&quot;;
-                };
</del><span class="cx">                 7EE6847312D26E5500E79415 /* cf */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderappcacheApplicationCacheStoragecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -31,21 +31,18 @@
</span><span class="cx"> #include &quot;ApplicationCacheHost.h&quot;
</span><span class="cx"> #include &quot;ApplicationCacheResource.h&quot;
</span><span class="cx"> #include &quot;FileSystem.h&quot;
</span><del>-#include &quot;URL.h&quot;
</del><span class="cx"> #include &quot;NotImplemented.h&quot;
</span><ins>+#include &quot;SQLiteDatabaseTracker.h&quot;
</ins><span class="cx"> #include &quot;SQLiteStatement.h&quot;
</span><span class="cx"> #include &quot;SQLiteTransaction.h&quot;
</span><span class="cx"> #include &quot;SecurityOrigin.h&quot;
</span><ins>+#include &quot;URL.h&quot;
</ins><span class="cx"> #include &quot;UUID.h&quot;
</span><del>-#include &lt;wtf/text/CString.h&gt;
</del><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/StringExtras.h&gt;
</span><ins>+#include &lt;wtf/text/CString.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-#include &quot;SQLiteDatabaseTracker.h&quot;
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static const char flatFileSubdirectory[] = &quot;ApplicationCache&quot;;
</span><span class="lines">@@ -104,10 +101,8 @@
</span><span class="cx"> 
</span><span class="cx"> ApplicationCacheGroup* ApplicationCacheStorage::loadCacheGroup(const URL&amp; manifestURL)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     openDatabase(false);
</span><span class="cx">     if (!m_database.isOpen())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -182,10 +177,8 @@
</span><span class="cx">     // to avoid trying to open the database over and over if it doesn't exist.
</span><span class="cx">     hasLoadedHashes = true;
</span><span class="cx">     
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     openDatabase(false);
</span><span class="cx">     if (!m_database.isOpen())
</span><span class="cx">         return;
</span><span class="lines">@@ -229,10 +222,7 @@
</span><span class="cx">     if (!m_database.isOpen())
</span><span class="cx">         return 0;
</span><span class="cx">         
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     // Check the database. Look for all cache groups with a newest cache.
</span><span class="cx">     SQLiteStatement statement(m_database, &quot;SELECT id, manifestURL, newestCache FROM CacheGroups WHERE newestCache IS NOT NULL&quot;);
</span><span class="lines">@@ -280,10 +270,8 @@
</span><span class="cx"> 
</span><span class="cx"> ApplicationCacheGroup* ApplicationCacheStorage::fallbackCacheGroupForURL(const URL&amp; url)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     ASSERT(!url.hasFragmentIdentifier());
</span><span class="cx"> 
</span><span class="cx">     // Check if an appropriate cache already exists in memory.
</span><span class="lines">@@ -455,10 +443,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplicationCacheStorage::calculateQuotaForOrigin(const SecurityOrigin* origin, int64_t&amp; quota)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     // If an Origin record doesn't exist, then the COUNT will be 0 and quota will be 0.
</span><span class="cx">     // Using the count to determine if a record existed or not is a safe way to determine
</span><span class="cx">     // if a quota of 0 is real, from the record, or from null.
</span><span class="lines">@@ -482,10 +468,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplicationCacheStorage::calculateUsageForOrigin(const SecurityOrigin* origin, int64_t&amp; usage)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     // If an Origins record doesn't exist, then the SUM will be null,
</span><span class="cx">     // which will become 0, as expected, when converting to a number.
</span><span class="cx">     SQLiteStatement statement(m_database, &quot;SELECT SUM(Caches.size)&quot;
</span><span class="lines">@@ -510,10 +494,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache(const SecurityOrigin* origin, ApplicationCache* cache, int64_t&amp; remainingSize)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     openDatabase(false);
</span><span class="cx">     if (!m_database.isOpen())
</span><span class="cx">         return false;
</span><span class="lines">@@ -563,10 +545,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplicationCacheStorage::storeUpdatedQuotaForOrigin(const SecurityOrigin* origin, int64_t quota)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     openDatabase(true);
</span><span class="cx">     if (!m_database.isOpen())
</span><span class="cx">         return false;
</span><span class="lines">@@ -633,10 +613,8 @@
</span><span class="cx">     
</span><span class="cx"> void ApplicationCacheStorage::openDatabase(bool createIfDoesNotExist)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     if (m_database.isOpen())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -950,10 +928,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplicationCacheStorage::storeUpdatedType(ApplicationCacheResource* resource, ApplicationCache* cache)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     ASSERT_UNUSED(cache, cache-&gt;storageID());
</span><span class="cx">     ASSERT(resource-&gt;storageID());
</span><span class="cx"> 
</span><span class="lines">@@ -970,10 +946,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplicationCacheStorage::store(ApplicationCacheResource* resource, ApplicationCache* cache)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     ASSERT(cache-&gt;storageID());
</span><span class="cx">     
</span><span class="cx">     openDatabase(true);
</span><span class="lines">@@ -1270,10 +1244,8 @@
</span><span class="cx">     
</span><span class="cx"> void ApplicationCacheStorage::remove(ApplicationCache* cache)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     if (!cache-&gt;storageID())
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="lines">@@ -1311,10 +1283,8 @@
</span><span class="cx"> 
</span><span class="cx"> void ApplicationCacheStorage::empty()
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     openDatabase(false);
</span><span class="cx">     
</span><span class="cx">     if (!m_database.isOpen())
</span><span class="lines">@@ -1379,10 +1349,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplicationCacheStorage::storeCopyOfCache(const String&amp; cacheDirectory, ApplicationCacheHost* cacheHost)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     ApplicationCache* cache = cacheHost-&gt;applicationCache();
</span><span class="cx">     if (!cache)
</span><span class="cx">         return true;
</span><span class="lines">@@ -1419,10 +1387,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplicationCacheStorage::manifestURLs(Vector&lt;URL&gt;* urls)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     ASSERT(urls);
</span><span class="cx">     openDatabase(false);
</span><span class="cx">     if (!m_database.isOpen())
</span><span class="lines">@@ -1441,10 +1407,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplicationCacheStorage::cacheGroupSize(const String&amp; manifestURL, int64_t* size)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     ASSERT(size);
</span><span class="cx">     openDatabase(false);
</span><span class="cx">     if (!m_database.isOpen())
</span><span class="lines">@@ -1471,10 +1435,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplicationCacheStorage::deleteCacheGroup(const String&amp; manifestURL)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     SQLiteTransaction deleteTransaction(m_database);
</span><span class="cx">     // Check to see if the group is in memory.
</span><span class="cx">     ApplicationCacheGroup* group = m_cachesInMemory.get(manifestURL);
</span><span class="lines">@@ -1526,10 +1488,8 @@
</span><span class="cx"> 
</span><span class="cx"> void ApplicationCacheStorage::vacuumDatabaseFile()
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS)
-    // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     openDatabase(false);
</span><span class="cx">     if (!m_database.isOpen())
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.h (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.h        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/platform/ScrollableArea.h        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -254,6 +254,8 @@
</span><span class="cx">     bool hasLayerForVerticalScrollbar() const;
</span><span class="cx">     bool hasLayerForScrollCorner() const;
</span><span class="cx"> 
</span><ins>+    virtual void sendWillRevealEdgeEventsIfNeeded(const IntPoint&amp;, const IntPoint&amp;) { }
+
</ins><span class="cx"> private:
</span><span class="cx">     virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const;
</span><span class="cx">     void scrollPositionChanged(const IntPoint&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformsqlSQLiteDatabaseTrackercppfromrev162767trunkSourceWebCoreplatformsqliosSQLiteDatabaseTrackercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/sql/SQLiteDatabaseTracker.cpp (from rev 162767, trunk/Source/WebCore/platform/sql/ios/SQLiteDatabaseTracker.cpp) (0 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/sql/SQLiteDatabaseTracker.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/sql/SQLiteDatabaseTracker.cpp        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -0,0 +1,87 @@
</span><ins>+/*
+ * Copyright (C) 2010, 2012 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. ``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
+ * 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;SQLiteDatabaseTracker.h&quot;
+
+#include &lt;mutex&gt;
+#include &lt;wtf/NeverDestroyed.h&gt;
+
+namespace WebCore {
+
+namespace SQLiteDatabaseTracker {
+
+static SQLiteDatabaseTrackerClient* s_staticSQLiteDatabaseTrackerClient = nullptr;
+static unsigned s_transactionInProgressCounter = 0;
+
+static std::mutex&amp; transactionInProgressMutex()
+{
+    static NeverDestroyed&lt;std::mutex&gt; tipMutex;
+    return tipMutex;
+}
+
+void setClient(SQLiteDatabaseTrackerClient* client)
+{
+    ASSERT(client);
+    ASSERT(!s_staticSQLiteDatabaseTrackerClient || s_staticSQLiteDatabaseTrackerClient == client);
+    s_staticSQLiteDatabaseTrackerClient = client;
+}
+
+void incrementTransactionInProgressCount()
+{
+    if (!s_staticSQLiteDatabaseTrackerClient)
+        return;
+
+    std::lock_guard&lt;std::mutex&gt; lock(transactionInProgressMutex());
+
+    s_transactionInProgressCounter++;
+    if (s_transactionInProgressCounter == 1)
+        s_staticSQLiteDatabaseTrackerClient-&gt;willBeginFirstTransaction();
+}
+
+void decrementTransactionInProgressCount()
+{
+    if (!s_staticSQLiteDatabaseTrackerClient)
+        return;
+
+    std::lock_guard&lt;std::mutex&gt; lock(transactionInProgressMutex());
+
+    ASSERT(s_transactionInProgressCounter);
+    s_transactionInProgressCounter--;
+
+    if (!s_transactionInProgressCounter)
+        s_staticSQLiteDatabaseTrackerClient-&gt;didFinishLastTransaction();
+}
+
+#if !ASSERT_DISABLED
+bool hasTransactionInProgress()
+{
+    return !s_staticSQLiteDatabaseTrackerClient || s_transactionInProgressCounter &gt; 0;
+}
+#endif
+
+} // namespace SQLiteDatabaseTracker
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformsqlSQLiteDatabaseTrackerhfromrev162767trunkSourceWebCoreplatformsqliosSQLiteDatabaseTrackerh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/sql/SQLiteDatabaseTracker.h (from rev 162767, trunk/Source/WebCore/platform/sql/ios/SQLiteDatabaseTracker.h) (0 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/sql/SQLiteDatabaseTracker.h                                (rev 0)
+++ trunk/Source/WebCore/platform/sql/SQLiteDatabaseTracker.h        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+/*
+ * Copyright (C) 2010, 2012 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. ``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
+ * 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 SQLiteDatabaseTracker_h
+#define SQLiteDatabaseTracker_h
+
+#include &quot;SQLiteDatabaseTrackerClient.h&quot;
+
+namespace WebCore {
+
+namespace SQLiteDatabaseTracker {
+
+void decrementTransactionInProgressCount();
+void incrementTransactionInProgressCount();
+
+void setClient(SQLiteDatabaseTrackerClient*);
+
+#if !ASSERT_DISABLED
+bool hasTransactionInProgress();
+#endif
+
+};
+
+class SQLiteTransactionInProgressAutoCounter {
+public:
+    SQLiteTransactionInProgressAutoCounter()
+    {
+        SQLiteDatabaseTracker::incrementTransactionInProgressCount();
+    }
+    ~SQLiteTransactionInProgressAutoCounter()
+    {
+        SQLiteDatabaseTracker::decrementTransactionInProgressCount();
+    }
+};
+
+} // namespace WebCore
+
+#endif // SQLiteDatabaseTracker_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformsqlSQLiteDatabaseTrackerClienthfromrev162767trunkSourceWebCoreplatformsqliosSQLiteDatabaseTrackerClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/sql/SQLiteDatabaseTrackerClient.h (from rev 162767, trunk/Source/WebCore/platform/sql/ios/SQLiteDatabaseTrackerClient.h) (0 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/sql/SQLiteDatabaseTrackerClient.h                                (rev 0)
+++ trunk/Source/WebCore/platform/sql/SQLiteDatabaseTrackerClient.h        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * 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. ``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
+ * 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 SQLiteDatabaseTrackerClient_h
+#define SQLiteDatabaseTrackerClient_h
+
+namespace WebCore {
+
+class SQLiteDatabaseTrackerClient {
+public:
+    virtual ~SQLiteDatabaseTrackerClient() { }
+
+    virtual void willBeginFirstTransaction() = 0;
+    virtual void didFinishLastTransaction() = 0;
+};
+
+} // namespace WebCore
+
+#endif // SQLiteDatabaseTrackerClient_h
</ins></span></pre></div>
<a id="trunkSourceWebCorestorageStorageAreaSynccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/StorageAreaSync.cpp (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/StorageAreaSync.cpp        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/storage/StorageAreaSync.cpp        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;EventNames.h&quot;
</span><span class="cx"> #include &quot;FileSystem.h&quot;
</span><span class="cx"> #include &quot;HTMLElement.h&quot;
</span><ins>+#include &quot;SQLiteDatabaseTracker.h&quot;
</ins><span class="cx"> #include &quot;SQLiteFileSystem.h&quot;
</span><span class="cx"> #include &quot;SQLiteStatement.h&quot;
</span><span class="cx"> #include &quot;SQLiteTransaction.h&quot;
</span><span class="lines">@@ -41,10 +42,6 @@
</span><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-#include &quot;SQLiteDatabaseTracker.h&quot;
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> // If the StorageArea undergoes rapid changes, don't sync each change to disk.
</span><span class="lines">@@ -236,9 +233,8 @@
</span><span class="cx">     ASSERT(!m_database.isOpen());
</span><span class="cx">     ASSERT(!m_databaseOpenFailed);
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     String databaseFilename = m_syncManager-&gt;fullDatabaseFilename(m_databaseIdentifier);
</span><span class="cx"> 
</span><span class="cx">     if (!fileExists(databaseFilename) &amp;&amp; openingStrategy == SkipIfNonExistent)
</span><span class="lines">@@ -410,9 +406,8 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-#if PLATFORM(IOS)
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     // If the clear flag is set, then we clear all items out before we write any new ones in.
</span><span class="cx">     if (clearItems) {
</span><span class="cx">         SQLiteStatement clear(m_database, &quot;DELETE FROM ItemTable&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCorestorageStorageTrackercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/StorageTracker.cpp (162786 => 162787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/StorageTracker.cpp        2014-01-25 23:04:54 UTC (rev 162786)
+++ trunk/Source/WebCore/storage/StorageTracker.cpp        2014-01-26 00:36:23 UTC (rev 162787)
</span><span class="lines">@@ -28,12 +28,13 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DatabaseThread.h&quot;
</span><span class="cx"> #include &quot;FileSystem.h&quot;
</span><del>-#include &quot;StorageThread.h&quot;
</del><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;PageGroup.h&quot;
</span><ins>+#include &quot;SQLiteDatabaseTracker.h&quot;
</ins><span class="cx"> #include &quot;SQLiteFileSystem.h&quot;
</span><span class="cx"> #include &quot;SQLiteStatement.h&quot;
</span><span class="cx"> #include &quot;SecurityOrigin.h&quot;
</span><ins>+#include &quot;StorageThread.h&quot;
</ins><span class="cx"> #include &quot;StorageTrackerClient.h&quot;
</span><span class="cx"> #include &quot;TextEncoding.h&quot;
</span><span class="cx"> #include &lt;wtf/Functional.h&gt;
</span><span class="lines">@@ -42,10 +43,6 @@
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-#include &quot;SQLiteDatabaseTracker.h&quot;
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static StorageTracker* storageTracker = 0;
</span><span class="lines">@@ -136,9 +133,9 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_isActive);
</span><span class="cx">     ASSERT(!isMainThread());
</span><del>-#if PLATFORM(IOS)
</del><ins>+
</ins><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     ASSERT(!m_databaseMutex.tryLock());
</span><span class="cx"> 
</span><span class="cx">     if (m_database.isOpen())
</span><span class="lines">@@ -199,9 +196,8 @@
</span><span class="cx">         openTrackerDatabase(false);
</span><span class="cx"> 
</span><span class="cx">         if (m_database.isOpen()) {
</span><del>-#if PLATFORM(IOS)
</del><span class="cx">             SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">             SQLiteStatement statement(m_database, &quot;SELECT origin FROM Origins&quot;);
</span><span class="cx">             if (statement.prepare() != SQLResultOk) {
</span><span class="cx">                 LOG_ERROR(&quot;Failed to prepare statement.&quot;);
</span><span class="lines">@@ -242,9 +238,9 @@
</span><span class="cx"> void StorageTracker::syncFileSystemAndTrackerDatabase()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><del>-#if PLATFORM(IOS)
</del><ins>+
</ins><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     ASSERT(m_isActive);
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;String&gt; paths;
</span><span class="lines">@@ -317,9 +313,8 @@
</span><span class="cx"> void StorageTracker::syncSetOriginDetails(const String&amp; originIdentifier, const String&amp; databaseFile)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><del>-#if PLATFORM(IOS)
</del><ins>+
</ins><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     MutexLocker locker(m_databaseMutex);
</span><span class="cx"> 
</span><span class="lines">@@ -389,9 +384,8 @@
</span><span class="cx"> void StorageTracker::syncDeleteAllOrigins()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><del>-#if PLATFORM(IOS)
</del><ins>+
</ins><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><span class="cx">     
</span><span class="cx">     MutexLocker locker(m_databaseMutex);
</span><span class="cx">     
</span><span class="lines">@@ -486,9 +480,8 @@
</span><span class="cx"> void StorageTracker::syncDeleteOrigin(const String&amp; originIdentifier)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><del>-#if PLATFORM(IOS)
</del><ins>+
</ins><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     MutexLocker locker(m_databaseMutex);
</span><span class="cx">     
</span><span class="lines">@@ -601,9 +594,7 @@
</span><span class="cx">     if (!m_database.isOpen())
</span><span class="cx">         return String();
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
</del><span class="cx">     SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     SQLiteStatement pathStatement(m_database, &quot;SELECT path FROM Origins WHERE origin=?&quot;);
</span><span class="cx">     if (pathStatement.prepare() != SQLResultOk) {
</span></span></pre>
</div>
</div>

</body>
</html>