<!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>[180771] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/180771">180771</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-02-27 11:24:25 -0800 (Fri, 27 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make IDBDatabase / IDBRequest suspendable
https://bugs.webkit.org/show_bug.cgi?id=142076
&lt;rdar://problem/19923085&gt;

Reviewed by Andreas Kling.

Source/WebCore:

Make IDBDatabase / IDBRequest suspendable under certain conditions to
make it more likely for pages using indexeddb to enter the PageCache.

IDBDatabase is safely suspendable if the database is closed. IDBRequest
is safely suspendable if the request no longer has any pending activity
(i.e. state is DONE and success / failure handler was called). We may
be able to do better later but this is the bare minimum for now.

Tests: fast/history/page-cache-indexed-closed-db.html
       fast/history/page-cache-indexed-opened-db.html

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::IDBDatabase):
(WebCore::IDBDatabase::closeConnection):
(WebCore::IDBDatabase::enqueueEvent):
(WebCore::IDBDatabase::canSuspend):
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::canSuspend):
* Modules/indexeddb/IDBRequest.h:

LayoutTests:

Add layout tests to make sure that:
- A page with an open indexeddb database is not page-cacheable
- A page with a closed indexeddb database is page-cacheable

* fast/history/page-cache-indexed-closed-db-expected.txt: Added.
* fast/history/page-cache-indexed-closed-db.html: Added.
* fast/history/page-cache-indexed-opened-db-expected.txt: Added.
* fast/history/page-cache-indexed-opened-db.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1TestExpectations">trunk/LayoutTests/platform/mac-wk1/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequesth">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasthistorypagecacheindexedcloseddbexpectedtxt">trunk/LayoutTests/fast/history/page-cache-indexed-closed-db-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasthistorypagecacheindexedcloseddbhtml">trunk/LayoutTests/fast/history/page-cache-indexed-closed-db.html</a></li>
<li><a href="#trunkLayoutTestsfasthistorypagecacheindexedopeneddbexpectedtxt">trunk/LayoutTests/fast/history/page-cache-indexed-opened-db-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasthistorypagecacheindexedopeneddbhtml">trunk/LayoutTests/fast/history/page-cache-indexed-opened-db.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (180770 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-02-27 19:22:10 UTC (rev 180770)
+++ trunk/LayoutTests/ChangeLog        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -1,5 +1,22 @@
</span><span class="cx"> 2015-02-27  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Make IDBDatabase / IDBRequest suspendable
+        https://bugs.webkit.org/show_bug.cgi?id=142076
+        &lt;rdar://problem/19923085&gt;
+
+        Reviewed by Andreas Kling.
+
+        Add layout tests to make sure that:
+        - A page with an open indexeddb database is not page-cacheable
+        - A page with a closed indexeddb database is page-cacheable
+
+        * fast/history/page-cache-indexed-closed-db-expected.txt: Added.
+        * fast/history/page-cache-indexed-closed-db.html: Added.
+        * fast/history/page-cache-indexed-opened-db-expected.txt: Added.
+        * fast/history/page-cache-indexed-opened-db.html: Added.
+
+2015-02-27  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=142052
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthistorypagecacheindexedcloseddbexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/history/page-cache-indexed-closed-db-expected.txt (0 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/history/page-cache-indexed-closed-db-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/history/page-cache-indexed-closed-db-expected.txt        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Tests that a page with a closed IndexedDB database goes into the page cache.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+pageshow - not from cache
+pagehide - entering cache
+pageshow - from cache
+PASS Page did enter and was restored from the page cache
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasthistorypagecacheindexedcloseddbhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/history/page-cache-indexed-closed-db.html (0 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/history/page-cache-indexed-closed-db.html                                (rev 0)
+++ trunk/LayoutTests/fast/history/page-cache-indexed-closed-db.html        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description('Tests that a page with a closed IndexedDB database goes into the page cache.');
+window.jsTestIsAsync = true;
+
+if (window.testRunner)
+    testRunner.overridePreference(&quot;WebKitUsesPageCachePreferenceKey&quot;, 1);
+
+window.addEventListener(&quot;pageshow&quot;, function(event) {
+    debug(&quot;pageshow - &quot; + (event.persisted ? &quot;&quot; : &quot;not &quot;) + &quot;from cache&quot;);
+
+    if (event.persisted) {
+        testPassed(&quot;Page did enter and was restored from the page cache&quot;);
+        finishJSTest();
+    }
+}, false);
+
+window.addEventListener(&quot;pagehide&quot;, function(event) {
+    debug(&quot;pagehide - &quot; + (event.persisted ? &quot;&quot; : &quot;not &quot;) + &quot;entering cache&quot;);
+    if (!event.persisted) {
+        testFailed(&quot;Page did not enter the page cache.&quot;);
+        finishJSTest();
+    }
+}, false);
+
+window.addEventListener('load', function() {
+    // Open the database.
+    var request = indexedDB.open(&quot;Page Cache Test&quot;);
+    request.onerror = function(event) {
+        testFailed(&quot;Could not open the database&quot;);
+        finishJSTest();
+    }
+    request.onsuccess = function(event) {
+      db = event.target.result;
+      db.close();
+
+      // Force a back navigation back to this page.
+      window.location.href = &quot;resources/page-cache-helper.html&quot;;
+    }
+}, false);
+
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfasthistorypagecacheindexedopeneddbexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/history/page-cache-indexed-opened-db-expected.txt (0 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/history/page-cache-indexed-opened-db-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/history/page-cache-indexed-opened-db-expected.txt        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Tests that a page with an open IndexedDB database does not go into the page cache.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+pageshow - not from cache
+PASS Page was not restored from page cache
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasthistorypagecacheindexedopeneddbhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/history/page-cache-indexed-opened-db.html (0 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/history/page-cache-indexed-opened-db.html                                (rev 0)
+++ trunk/LayoutTests/fast/history/page-cache-indexed-opened-db.html        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description('Tests that a page with an open IndexedDB database does not go into the page cache.');
+window.jsTestIsAsync = true;
+
+if (window.testRunner)
+    testRunner.overridePreference(&quot;WebKitUsesPageCachePreferenceKey&quot;, 1);
+
+window.addEventListener(&quot;pageshow&quot;, function(event) {
+    debug(&quot;pageshow - &quot; + (event.persisted ? &quot;&quot; : &quot;not &quot;) + &quot;from cache&quot;);
+    if (!window.sessionStorage.page_cache_open_indexeddb_test_started)
+        return;
+
+    delete window.sessionStorage.page_cache_open_indexeddb_test_started;
+
+    if (event.persisted)
+        testFailed(&quot;Page did enter and was restored from the page cache&quot;);
+    else
+        testPassed(&quot;Page was not restored from page cache&quot;);
+    finishJSTest();
+}, false);
+
+window.addEventListener(&quot;pagehide&quot;, function(event) {
+    debug(&quot;pagehide - &quot; + (event.persisted ? &quot;&quot; : &quot;not &quot;) + &quot;entering cache&quot;);
+    if (event.persisted) {
+        testFailed(&quot;Page entered the page cache.&quot;);
+        finishJSTest();
+    }
+}, false);
+
+window.addEventListener('load', function() {
+    // Open the database.
+    var request = indexedDB.open(&quot;Page Cache Test&quot;);
+    request.onerror = function(event) {
+        testFailed(&quot;Could not open the database&quot;);
+        finishJSTest();
+    }
+    request.onsuccess = function(event) {
+      db = event.target.result;
+      // Force a back navigation back to this page.
+      window.sessionStorage.page_cache_open_indexeddb_test_started = true;
+      window.location.href = &quot;resources/page-cache-helper.html&quot;;
+    }
+}, false);
+
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (180770 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/TestExpectations        2015-02-27 19:22:10 UTC (rev 180770)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -39,6 +39,8 @@
</span><span class="cx"> ### START OF (2) Failures without bug reports
</span><span class="cx"> 
</span><span class="cx"> # IndexedDB is not yet enabled in Mac WK1
</span><ins>+fast/history/page-cache-indexed-closed-db.html
+fast/history/page-cache-indexed-opened-db.html
</ins><span class="cx"> inspector-protocol/indexeddb
</span><span class="cx"> storage/indexeddb
</span><span class="cx"> http/tests/security/cross-origin-indexeddb-allowed.html
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (180770 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-02-27 19:22:10 UTC (rev 180770)
+++ trunk/Source/WebCore/ChangeLog        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -1,5 +1,34 @@
</span><span class="cx"> 2015-02-27  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Make IDBDatabase / IDBRequest suspendable
+        https://bugs.webkit.org/show_bug.cgi?id=142076
+        &lt;rdar://problem/19923085&gt;
+
+        Reviewed by Andreas Kling.
+
+        Make IDBDatabase / IDBRequest suspendable under certain conditions to
+        make it more likely for pages using indexeddb to enter the PageCache.
+
+        IDBDatabase is safely suspendable if the database is closed. IDBRequest
+        is safely suspendable if the request no longer has any pending activity
+        (i.e. state is DONE and success / failure handler was called). We may
+        be able to do better later but this is the bare minimum for now.
+
+        Tests: fast/history/page-cache-indexed-closed-db.html
+               fast/history/page-cache-indexed-opened-db.html
+
+        * Modules/indexeddb/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::IDBDatabase):
+        (WebCore::IDBDatabase::closeConnection):
+        (WebCore::IDBDatabase::enqueueEvent):
+        (WebCore::IDBDatabase::canSuspend):
+        * Modules/indexeddb/IDBDatabase.h:
+        * Modules/indexeddb/IDBRequest.cpp:
+        (WebCore::IDBRequest::canSuspend):
+        * Modules/indexeddb/IDBRequest.h:
+
+2015-02-27  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=142052
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (180770 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2015-02-27 19:22:10 UTC (rev 180770)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -61,6 +61,7 @@
</span><span class="cx">     : ActiveDOMObject(context)
</span><span class="cx">     , m_backend(backend)
</span><span class="cx">     , m_closePending(false)
</span><ins>+    , m_isClosed(false)
</ins><span class="cx">     , m_contextStopped(false)
</span><span class="cx">     , m_databaseCallbacks(callbacks)
</span><span class="cx"> {
</span><span class="lines">@@ -297,6 +298,8 @@
</span><span class="cx">         bool removed = eventQueue.cancelEvent(*m_enqueuedEvents[i]);
</span><span class="cx">         ASSERT_UNUSED(removed, removed);
</span><span class="cx">     }
</span><ins>+
+    m_isClosed = true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::onVersionChange(uint64_t oldVersion, uint64_t newVersion, IndexedDB::VersionNullness newVersionNullness)
</span><span class="lines">@@ -314,6 +317,7 @@
</span><span class="cx"> void IDBDatabase::enqueueEvent(PassRefPtr&lt;Event&gt; event)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_contextStopped);
</span><ins>+    ASSERT(!m_isClosed);
</ins><span class="cx">     ASSERT(scriptExecutionContext());
</span><span class="cx">     event-&gt;setTarget(this);
</span><span class="cx">     scriptExecutionContext()-&gt;eventQueue().enqueueEvent(event.get());
</span><span class="lines">@@ -357,6 +361,11 @@
</span><span class="cx">     m_contextStopped = true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool IDBDatabase::canSuspend() const
+{
+    return m_isClosed;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h (180770 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2015-02-27 19:22:10 UTC (rev 180770)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -112,8 +112,9 @@
</span><span class="cx">     IDBDatabase(ScriptExecutionContext*, PassRefPtr&lt;IDBDatabaseBackend&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;);
</span><span class="cx"> 
</span><span class="cx">     // ActiveDOMObject
</span><del>-    virtual void stop() override;
-    virtual const char* activeDOMObjectName() const override { return &quot;IDBDatabase&quot;; }
</del><ins>+    void stop() override;
+    const char* activeDOMObjectName() const override { return &quot;IDBDatabase&quot;; }
+    bool canSuspend() const override;
</ins><span class="cx"> 
</span><span class="cx">     // EventTarget
</span><span class="cx">     virtual void refEventTarget() override final { ref(); }
</span><span class="lines">@@ -128,6 +129,7 @@
</span><span class="cx">     TransactionMap m_transactions;
</span><span class="cx"> 
</span><span class="cx">     bool m_closePending;
</span><ins>+    bool m_isClosed;
</ins><span class="cx">     bool m_contextStopped;
</span><span class="cx"> 
</span><span class="cx">     // Keep track of the versionchange events waiting to be fired on this
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (180770 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2015-02-27 19:22:10 UTC (rev 180770)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -443,6 +443,11 @@
</span><span class="cx">         markEarlyDeath();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool IDBRequest::canSuspend() const
+{
+    return !m_hasPendingActivity;
+}
+
</ins><span class="cx"> EventTargetInterface IDBRequest::eventTargetInterface() const
</span><span class="cx"> {
</span><span class="cx">     return IDBRequestEventTargetInterfaceType;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (180770 => 180771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2015-02-27 19:22:10 UTC (rev 180770)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2015-02-27 19:24:25 UTC (rev 180771)
</span><span class="lines">@@ -131,8 +131,9 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     // ActiveDOMObject
</span><del>-    virtual void stop() override;
-    virtual const char* activeDOMObjectName() const override { return &quot;IDBRequest&quot;; }
</del><ins>+    void stop() override;
+    const char* activeDOMObjectName() const override { return &quot;IDBRequest&quot;; }
+    bool canSuspend() const override;
</ins><span class="cx"> 
</span><span class="cx">     // EventTarget
</span><span class="cx">     virtual void refEventTarget() override final { ref(); }
</span></span></pre>
</div>
</div>

</body>
</html>