<!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>[187926] 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/187926">187926</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-08-04 17:57:51 -0700 (Tue, 04 Aug 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove database thread pause code
https://bugs.webkit.org/show_bug.cgi?id=147669

Reviewed by Daniel Bates.

Source/WebCore:

We now grab power assertions while running SQLite transactions,
and this code isn't used at all with modern WebKit so let's just get rid of it.

* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::DatabaseContext): Deleted.
(WebCore::DatabaseContext::databaseThread): Deleted.
(WebCore::DatabaseContext::setPaused): Deleted.
* Modules/webdatabase/DatabaseContext.h:
* Modules/webdatabase/DatabaseTask.cpp:
(WebCore::Database::DatabaseTransactionTask::shouldPerformWhilePaused): Deleted.
* Modules/webdatabase/DatabaseTask.h:
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::DatabaseThread): Deleted.
(WebCore::DatabaseThread::requestTermination): Deleted.
(WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask): Deleted.
(WebCore::DatabaseUnpauseTask::shouldPerformWhilePaused): Deleted.
(WebCore::DatabaseUnpauseTask::doPerformTask): Deleted.
(WebCore::DatabaseUnpauseTask::debugTaskName): Deleted.
(WebCore::DatabaseThread::setPaused): Deleted.
(WebCore::DatabaseThread::handlePausedQueue): Deleted.
(WebCore::DatabaseThread::databaseThread): Deleted.
* Modules/webdatabase/DatabaseThread.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::setDatabasesPaused): Deleted.
* Modules/webdatabase/DatabaseTracker.h:

Source/WebKit/ios:

* Misc/WebUIKitSupport.mm:
(WebKitSetBackgroundAndForegroundNotificationNames):
(applicationDidEnterBackground): Deleted.
(applicationWillEnterForeground): Deleted.

Source/WebKit/mac:

* Storage/WebDatabaseManager.mm:
(WebKitSetWebDatabasePaused): Deleted.
* Storage/WebDatabaseManagerInternal.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseContextcpp">trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseContexth">trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.h</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseTaskcpp">trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseTaskh">trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.h</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseThreadcpp">trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseThreadh">trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.h</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseTrackercpp">trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseTrackerh">trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.h</a></li>
<li><a href="#trunkSourceWebKitiosChangeLog">trunk/Source/WebKit/ios/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitiosMiscWebUIKitSupportmm">trunk/Source/WebKit/ios/Misc/WebUIKitSupport.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacStorageWebDatabaseManagermm">trunk/Source/WebKit/mac/Storage/WebDatabaseManager.mm</a></li>
<li><a href="#trunkSourceWebKitmacStorageWebDatabaseManagerInternalh">trunk/Source/WebKit/mac/Storage/WebDatabaseManagerInternal.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebCore/ChangeLog        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2015-08-04  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Remove database thread pause code
+        https://bugs.webkit.org/show_bug.cgi?id=147669
+
+        Reviewed by Daniel Bates.
+
+        We now grab power assertions while running SQLite transactions, 
+        and this code isn't used at all with modern WebKit so let's just get rid of it.
+
+        * Modules/webdatabase/DatabaseContext.cpp:
+        (WebCore::DatabaseContext::DatabaseContext): Deleted.
+        (WebCore::DatabaseContext::databaseThread): Deleted.
+        (WebCore::DatabaseContext::setPaused): Deleted.
+        * Modules/webdatabase/DatabaseContext.h:
+        * Modules/webdatabase/DatabaseTask.cpp:
+        (WebCore::Database::DatabaseTransactionTask::shouldPerformWhilePaused): Deleted.
+        * Modules/webdatabase/DatabaseTask.h:
+        * Modules/webdatabase/DatabaseThread.cpp:
+        (WebCore::DatabaseThread::DatabaseThread): Deleted.
+        (WebCore::DatabaseThread::requestTermination): Deleted.
+        (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask): Deleted.
+        (WebCore::DatabaseUnpauseTask::shouldPerformWhilePaused): Deleted.
+        (WebCore::DatabaseUnpauseTask::doPerformTask): Deleted.
+        (WebCore::DatabaseUnpauseTask::debugTaskName): Deleted.
+        (WebCore::DatabaseThread::setPaused): Deleted.
+        (WebCore::DatabaseThread::handlePausedQueue): Deleted.
+        (WebCore::DatabaseThread::databaseThread): Deleted.
+        * Modules/webdatabase/DatabaseThread.h:
+        * Modules/webdatabase/DatabaseTracker.cpp:
+        (WebCore::DatabaseTracker::setDatabasesPaused): Deleted.
+        * Modules/webdatabase/DatabaseTracker.h:
+
</ins><span class="cx"> 2015-08-04  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Subframes with no current HistoryItem should not prevent page-caching
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -99,9 +99,6 @@
</span><span class="cx">     , m_hasOpenDatabases(false)
</span><span class="cx">     , m_isRegistered(true) // will register on construction below.
</span><span class="cx">     , m_hasRequestedTermination(false)
</span><del>-#if PLATFORM(IOS)
-    , m_paused(false)
-#endif
</del><span class="cx"> {
</span><span class="cx">     // ActiveDOMObject expects this to be called to set internal flags.
</span><span class="cx">     suspendIfNeeded();
</span><span class="lines">@@ -156,9 +153,6 @@
</span><span class="cx"> DatabaseThread* DatabaseContext::databaseThread()
</span><span class="cx"> {
</span><span class="cx">     if (!m_databaseThread &amp;&amp; !m_hasOpenDatabases) {
</span><del>-#if PLATFORM(IOS)
-        MutexLocker lock(m_databaseThreadMutex);
-#endif
</del><span class="cx">         // It's OK to ask for the m_databaseThread after we've requested
</span><span class="cx">         // termination because we're still using it to execute the closing
</span><span class="cx">         // of the database. However, it is NOT OK to create a new thread
</span><span class="lines">@@ -170,27 +164,11 @@
</span><span class="cx">         m_databaseThread = DatabaseThread::create();
</span><span class="cx">         if (!m_databaseThread-&gt;start())
</span><span class="cx">             m_databaseThread = nullptr;
</span><del>-
-#if PLATFORM(IOS)
-        if (m_databaseThread)
-            m_databaseThread-&gt;setPaused(m_paused);
-#endif
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return m_databaseThread.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-void DatabaseContext::setPaused(bool paused)
-{
-    MutexLocker lock(m_databaseThreadMutex);
-
-    m_paused = paused;
-    if (m_databaseThread)
-        m_databaseThread-&gt;setPaused(m_paused);
-}
-#endif // PLATFORM(IOS)
-
</del><span class="cx"> bool DatabaseContext::stopDatabases(DatabaseTaskSynchronizer* synchronizer)
</span><span class="cx"> {
</span><span class="cx">     if (m_isRegistered) {
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.h (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.h        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.h        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -50,10 +50,6 @@
</span><span class="cx"> 
</span><span class="cx">     DatabaseThread* databaseThread();
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    void setPaused(bool);
-#endif
-
</del><span class="cx">     void setHasOpenDatabases() { m_hasOpenDatabases = true; }
</span><span class="cx">     bool hasOpenDatabases() const { return m_hasOpenDatabases; }
</span><span class="cx"> 
</span><span class="lines">@@ -84,11 +80,6 @@
</span><span class="cx">     bool m_hasRequestedTermination;
</span><span class="cx"> 
</span><span class="cx">     friend class DatabaseManager;
</span><del>-
-#if PLATFORM(IOS)
-    Mutex m_databaseThreadMutex;
-    bool m_paused;
-#endif
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseTaskcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.cpp (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.cpp        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.cpp        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -172,13 +172,6 @@
</span><span class="cx">         m_transaction-&gt;notifyDatabaseThreadIsShuttingDown();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-bool Database::DatabaseTransactionTask::shouldPerformWhilePaused() const
-{
-    return m_transaction-&gt;shouldPerformWhilePaused();
-}
-#endif
-
</del><span class="cx"> void DatabaseBackend::DatabaseTransactionTask::doPerformTask()
</span><span class="cx"> {
</span><span class="cx">     m_transaction-&gt;performNextStep();
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseTaskh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.h (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.h        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.h        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -71,10 +71,6 @@
</span><span class="cx"> public:
</span><span class="cx">     virtual ~DatabaseTask();
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    virtual bool shouldPerformWhilePaused() const = 0;
-#endif
-
</del><span class="cx">     void performTask();
</span><span class="cx"> 
</span><span class="cx">     DatabaseBackend* database() const { return m_database; }
</span><span class="lines">@@ -102,10 +98,6 @@
</span><span class="cx"> public:
</span><span class="cx">     DatabaseOpenTask(DatabaseBackend*, bool setVersionInNewDatabase, DatabaseTaskSynchronizer*, DatabaseError&amp;, String&amp; errorMessage, bool&amp; success);
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    virtual bool shouldPerformWhilePaused() const override { return true; }
-#endif
-
</del><span class="cx"> private:
</span><span class="cx">     virtual void doPerformTask() override;
</span><span class="cx"> #if !LOG_DISABLED
</span><span class="lines">@@ -122,10 +114,6 @@
</span><span class="cx"> public:
</span><span class="cx">     DatabaseCloseTask(DatabaseBackend*, DatabaseTaskSynchronizer*);
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    virtual bool shouldPerformWhilePaused() const override { return true; }
-#endif
-
</del><span class="cx"> private:
</span><span class="cx">     virtual void doPerformTask() override;
</span><span class="cx"> #if !LOG_DISABLED
</span><span class="lines">@@ -138,10 +126,6 @@
</span><span class="cx">     explicit DatabaseTransactionTask(PassRefPtr&lt;SQLTransactionBackend&gt;);
</span><span class="cx">     virtual ~DatabaseTransactionTask();
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    virtual bool shouldPerformWhilePaused() const override;
-#endif
-
</del><span class="cx">     SQLTransactionBackend* transaction() const { return m_transaction.get(); }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -158,10 +142,6 @@
</span><span class="cx"> public:
</span><span class="cx">     DatabaseTableNamesTask(DatabaseBackend*, DatabaseTaskSynchronizer*, Vector&lt;String&gt;&amp; names);
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    virtual bool shouldPerformWhilePaused() const override { return true; }
-#endif
-
</del><span class="cx"> private:
</span><span class="cx">     virtual void doPerformTask() override;
</span><span class="cx"> #if !LOG_DISABLED
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -40,9 +40,6 @@
</span><span class="cx"> 
</span><span class="cx"> DatabaseThread::DatabaseThread()
</span><span class="cx">     : m_threadID(0)
</span><del>-#if PLATFORM(IOS)
-    , m_paused(false)
-#endif
</del><span class="cx">     , m_transactionClient(std::make_unique&lt;SQLTransactionClient&gt;())
</span><span class="cx">     , m_transactionCoordinator(std::make_unique&lt;SQLTransactionCoordinator&gt;())
</span><span class="cx">     , m_cleanupSync(nullptr)
</span><span class="lines">@@ -78,9 +75,6 @@
</span><span class="cx"> {
</span><span class="cx">     m_cleanupSync = cleanupSync;
</span><span class="cx">     LOG(StorageAPI, &quot;DatabaseThread %p was asked to terminate\n&quot;, this);
</span><del>-#if PLATFORM(IOS)
-    m_pausedQueue.kill();
-#endif
</del><span class="cx">     m_queue.kill();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -102,75 +96,6 @@
</span><span class="cx">     dbThread-&gt;databaseThread();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-class DatabaseUnpauseTask : public DatabaseTask {
-public:
-    explicit DatabaseUnpauseTask(DatabaseThread&amp; thread)
-        : DatabaseTask(0, 0)
-        , m_thread(thread)
-    { }
-
-    virtual bool shouldPerformWhilePaused() const 
-    {
-        // Since we're not locking the DatabaseThread::m_paused in the main database thread loop, it's possible that
-        // a DatabaseUnpauseTask might be added to the m_pausedQueue and performed from within ::handlePausedQueue.
-        // To protect against this, we allow it to be performed even if the database is paused.
-        // If the thread is paused when it is being performed, the tasks from the paused queue will simply be
-        // requeued instead of performed.
-        return true;
-    }
-
-private:
-    virtual void doPerformTask()
-    {
-        m_thread.handlePausedQueue();
-    }
-#if !LOG_DISABLED
-    virtual const char* debugTaskName() const { return &quot;DatabaseUnpauseTask&quot;; }
-#endif
-
-    DatabaseThread&amp; m_thread;
-};
-
-
-void DatabaseThread::setPaused(bool paused)
-{
-    if (m_paused == paused)
-        return;
-
-    MutexLocker pausedLocker(m_pausedMutex);
-    m_paused = paused;
-    if (!m_paused)
-        scheduleTask(std::make_unique&lt;DatabaseUnpauseTask&gt;(*this));
-}
-
-void DatabaseThread::handlePausedQueue()
-{
-    Vector&lt;std::unique_ptr&lt;DatabaseTask&gt; &gt; pausedTasks;
-    while (auto task = m_pausedQueue.tryGetMessage())
-        pausedTasks.append(WTF::move(task));
-
-    for (auto&amp; pausedTask : pausedTasks) {
-        AutodrainedPool pool;
-
-        std::unique_ptr&lt;DatabaseTask&gt; task(pausedTask.release());
-        {
-            MutexLocker pausedLocker(m_pausedMutex);
-            if (m_paused) {
-                m_pausedQueue.append(WTF::move(task));
-                continue;
-            }
-        }
-            
-        if (terminationRequested())
-            break;
-    
-        task-&gt;performTask();
-    }
-}
-#endif //PLATFORM(IOS)
-
-
</del><span class="cx"> void DatabaseThread::databaseThread()
</span><span class="cx"> {
</span><span class="cx">     {
</span><span class="lines">@@ -182,14 +107,7 @@
</span><span class="cx">     while (auto task = m_queue.waitForMessage()) {
</span><span class="cx">         AutodrainedPool pool;
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-        if (!m_paused || task-&gt;shouldPerformWhilePaused())
-            task-&gt;performTask();
-        else
-            m_pausedQueue.append(WTF::move(task));
-#else
</del><span class="cx">         task-&gt;performTask();
</span><del>-#endif
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Clean up the list of all pending transactions on this database thread
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseThreadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.h (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.h        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.h        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -66,11 +66,6 @@
</span><span class="cx">     SQLTransactionClient* transactionClient() { return m_transactionClient.get(); }
</span><span class="cx">     SQLTransactionCoordinator* transactionCoordinator() { return m_transactionCoordinator.get(); }
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    void setPaused(bool);
-    void handlePausedQueue();
-#endif
-
</del><span class="cx"> private:
</span><span class="cx">     DatabaseThread();
</span><span class="cx"> 
</span><span class="lines">@@ -82,11 +77,6 @@
</span><span class="cx">     RefPtr&lt;DatabaseThread&gt; m_selfRef;
</span><span class="cx"> 
</span><span class="cx">     MessageQueue&lt;DatabaseTask&gt; m_queue;
</span><del>-#if PLATFORM(IOS)
-    MessageQueue&lt;DatabaseTask&gt; m_pausedQueue;
-    Mutex m_pausedMutex;
-    volatile bool m_paused;
-#endif
</del><span class="cx"> 
</span><span class="cx">     // This set keeps track of the open databases that have been used on this thread.
</span><span class="cx">     typedef HashSet&lt;RefPtr&lt;Database&gt;&gt; DatabaseSet;
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseTrackercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -1348,22 +1348,6 @@
</span><span class="cx">     openDatabaseMutex().unlock();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DatabaseTracker::setDatabasesPaused(bool paused)
-{
-    MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
-    if (!m_openDatabaseMap)
-        return;
-
-    // This walking is - sadly - the only reliable way to get at each open database thread.
-    // This will be cleaner once &lt;rdar://problem/5680441&gt; or some other DB thread consolidation takes place.
-    for (auto&amp; databaseNameMap : m_openDatabaseMap-&gt;values()) {
-        for (auto&amp; databaseSet : databaseNameMap-&gt;values()) {
-            for (auto&amp; database : *databaseSet)
-                database-&gt;databaseContext()-&gt;setPaused(paused);
-        }
-    }
-}
-
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void DatabaseTracker::setClient(DatabaseManagerClient* client)
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseTrackerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.h (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.h        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.h        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -113,8 +113,6 @@
</span><span class="cx">     
</span><span class="cx">     WEBCORE_EXPORT static void emptyDatabaseFilesRemovalTaskWillBeScheduled();
</span><span class="cx">     WEBCORE_EXPORT static void emptyDatabaseFilesRemovalTaskDidFinish();
</span><del>-    
-    WEBCORE_EXPORT void setDatabasesPaused(bool);
</del><span class="cx"> #endif
</span><span class="cx">     
</span><span class="cx">     void setClient(DatabaseManagerClient*);
</span></span></pre></div>
<a id="trunkSourceWebKitiosChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/ChangeLog (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/ChangeLog        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebKit/ios/ChangeLog        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-08-04  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Remove database thread pause code
+        https://bugs.webkit.org/show_bug.cgi?id=147669
+
+        Reviewed by Daniel Bates.
+
+        * Misc/WebUIKitSupport.mm:
+        (WebKitSetBackgroundAndForegroundNotificationNames):
+        (applicationDidEnterBackground): Deleted.
+        (applicationWillEnterForeground): Deleted.
+
</ins><span class="cx"> 2015-07-21  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Expose shrink-wrapping as UIKit support SPI
</span></span></pre></div>
<a id="trunkSourceWebKitiosMiscWebUIKitSupportmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/Misc/WebUIKitSupport.mm (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/Misc/WebUIKitSupport.mm        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebKit/ios/Misc/WebUIKitSupport.mm        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -110,27 +110,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void applicationDidEnterBackground(CFNotificationCenterRef, void*, CFStringRef, const void *, CFDictionaryRef)
-{
-    WebKitSetWebDatabasePaused(true);
-}
-
-static void applicationWillEnterForeground(CFNotificationCenterRef, void*, CFStringRef, const void*, CFDictionaryRef)
-{
-    WebKitSetWebDatabasePaused(false);
-}
-
</del><span class="cx"> void WebKitSetBackgroundAndForegroundNotificationNames(NSString *didEnterBackgroundName, NSString *willEnterForegroundName)
</span><span class="cx"> {
</span><del>-    static bool initialized = false;
-    if (initialized)
-        return;
-    initialized = true;
-
-    CFNotificationCenterRef notificationCenter = CFNotificationCenterGetLocalCenter();
-    CFNotificationCenterAddObserver(notificationCenter, 0, applicationDidEnterBackground, (CFStringRef)didEnterBackgroundName, NULL, CFNotificationSuspensionBehaviorCoalesce);
-    CFNotificationCenterAddObserver(notificationCenter, 0, applicationWillEnterForeground, (CFStringRef)willEnterForegroundName, NULL, CFNotificationSuspensionBehaviorCoalesce);
-
</del><ins>+    // FIXME: Remove this function.
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static WebBackgroundTaskIdentifier invalidTaskIdentifier = 0;
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-08-04  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Remove database thread pause code
+        https://bugs.webkit.org/show_bug.cgi?id=147669
+
+        Reviewed by Daniel Bates.
+
+        * Storage/WebDatabaseManager.mm:
+        (WebKitSetWebDatabasePaused): Deleted.
+        * Storage/WebDatabaseManagerInternal.h:
+
</ins><span class="cx"> 2015-08-04  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix the build.
</span></span></pre></div>
<a id="trunkSourceWebKitmacStorageWebDatabaseManagermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Storage/WebDatabaseManager.mm (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Storage/WebDatabaseManager.mm        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebKit/mac/Storage/WebDatabaseManager.mm        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -291,10 +291,6 @@
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span><del>-void WebKitSetWebDatabasePaused(bool paused)
-{
-    DatabaseTracker::tracker().setDatabasesPaused(paused);
-}
</del><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx"> 
</span><span class="cx"> static NSString *databasesDirectoryPath()
</span></span></pre></div>
<a id="trunkSourceWebKitmacStorageWebDatabaseManagerInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Storage/WebDatabaseManagerInternal.h (187925 => 187926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Storage/WebDatabaseManagerInternal.h        2015-08-05 00:46:43 UTC (rev 187925)
+++ trunk/Source/WebKit/mac/Storage/WebDatabaseManagerInternal.h        2015-08-05 00:57:51 UTC (rev 187926)
</span><span class="lines">@@ -36,5 +36,4 @@
</span><span class="cx"> + (void)endBackgroundTask;
</span><span class="cx"> @end
</span><span class="cx"> 
</span><del>-void WebKitSetWebDatabasePaused(bool);
</del><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>