<!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>[190884] 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/190884">190884</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-10-12 13:24:32 -0700 (Mon, 12 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: Start version change transaction for connections to new database.
https://bugs.webkit.org/show_bug.cgi?id=150033

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by changes to existing tests).

* CMakeLists.txt:
* Modules/indexeddb/IDBDatabase.h:

* Modules/indexeddb/client/IDBAnyImpl.cpp:
(WebCore::IDBClient::IDBAny::IDBAny):
(WebCore::IDBClient::IDBAny::~IDBAny):
(WebCore::IDBClient::IDBAny::idbDatabase):
(WebCore::IDBClient::IDBAny::domStringList):
(WebCore::IDBClient::IDBAny::idbCursor):
(WebCore::IDBClient::IDBAny::idbCursorWithValue):
(WebCore::IDBClient::IDBAny::idbFactory):
(WebCore::IDBClient::IDBAny::idbIndex):
(WebCore::IDBClient::IDBAny::idbObjectStore):
(WebCore::IDBClient::IDBAny::idbTransaction):
(WebCore::IDBClient::IDBAny::scriptValue):
(WebCore::IDBClient::IDBAny::integer):
(WebCore::IDBClient::IDBAny::string):
(WebCore::IDBClient::IDBAny::keyPath):
* Modules/indexeddb/client/IDBAnyImpl.h:
(WebCore::IDBClient::IDBAny::create):

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
(WebCore::IDBClient::IDBConnectionToServer::registerDatabaseConnection):
(WebCore::IDBClient::IDBConnectionToServer::unregisterDatabaseConnection):
* Modules/indexeddb/client/IDBConnectionToServer.h:

* Modules/indexeddb/client/IDBDatabaseImpl.cpp: Added.
(WebCore::IDBClient::IDBDatabase::create):
(WebCore::IDBClient::IDBDatabase::IDBDatabase):
(WebCore::IDBClient::IDBDatabase::~IDBDatabase):
(WebCore::IDBClient::IDBDatabase::name):
(WebCore::IDBClient::IDBDatabase::version):
(WebCore::IDBClient::IDBDatabase::objectStoreNames):
(WebCore::IDBClient::IDBDatabase::createObjectStore):
(WebCore::IDBClient::IDBDatabase::transaction):
(WebCore::IDBClient::IDBDatabase::deleteObjectStore):
(WebCore::IDBClient::IDBDatabase::close):
(WebCore::IDBClient::IDBDatabase::activeDOMObjectName):
(WebCore::IDBClient::IDBDatabase::canSuspendForPageCache):
(WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
* Modules/indexeddb/client/IDBDatabaseImpl.h: Added.
(WebCore::IDBClient::IDBDatabase::info):

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::onError):
(WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
(WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
(WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::IDBRequest):
(WebCore::IDBClient::IDBRequest::result):
(WebCore::IDBClient::IDBRequest::source):
(WebCore::IDBClient::IDBRequest::transaction):
* Modules/indexeddb/client/IDBRequestImpl.h:
(WebCore::IDBClient::IDBRequest::connection):

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::create):
(WebCore::IDBClient::IDBTransaction::IDBTransaction):
(WebCore::IDBClient::IDBTransaction::~IDBTransaction):
(WebCore::IDBClient::IDBTransaction::mode):
(WebCore::IDBClient::IDBTransaction::db):
(WebCore::IDBClient::IDBTransaction::error):
(WebCore::IDBClient::IDBTransaction::objectStore):
(WebCore::IDBClient::IDBTransaction::abort):
(WebCore::IDBClient::IDBTransaction::activeDOMObjectName):
(WebCore::IDBClient::IDBTransaction::canSuspendForPageCache):
* Modules/indexeddb/client/IDBTransactionImpl.h:
(WebCore::IDBClient::IDBTransaction::info):

* Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
(WebCore::IDBClient::IDBVersionChangeEvent::IDBVersionChangeEvent):
(WebCore::IDBClient::IDBVersionChangeEvent::eventInterface):
* Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
(WebCore::IDBClient::IDBVersionChangeEvent::create):

* Modules/indexeddb/legacy/LegacyDatabase.h:

* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent):
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h:

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::registerDatabaseConnection):
(WebCore::IDBServer::IDBServer::unregisterDatabaseConnection):
(WebCore::IDBServer::IDBServer::deleteDatabase):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::info):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::hasAnyOpenConnections):
(WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
(WebCore::IDBServer::UniqueIDBDatabase::addOpenDatabaseConnection):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::nextDatabaseConnectionIdentifier):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::create):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::identifier):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::database):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionToClient):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::closePending):

* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::create):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::databaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::info):

* Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
(WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
* Modules/indexeddb/shared/IDBDatabaseInfo.h:
(WebCore::IDBDatabaseInfo::name):
(WebCore::IDBDatabaseInfo::version):
(WebCore::IDBDatabaseInfo::IDBDatabaseInfo): Deleted.

* Modules/indexeddb/shared/IDBError.h:

* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
(WebCore::IDBRequestData::requestedVersion):
* Modules/indexeddb/shared/IDBRequestData.h:

* Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::nextClientResourceNumber):
(WebCore::nextServerResourceNumber):
(WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
(WebCore::IDBResourceIdentifier::emptyValue):
(WebCore::IDBResourceIdentifier::deletedValue):
(WebCore::nextResourceNumber): Deleted.
* Modules/indexeddb/shared/IDBResourceIdentifier.h:

* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::IDBResultData):
(WebCore::IDBResultData::error):
(WebCore::IDBResultData::openDatabaseSuccess):
(WebCore::IDBResultData::openDatabaseUpgradeNeeded):
(WebCore::IDBResultData::databaseInfo):
(WebCore::IDBResultData::transactionInfo):
* Modules/indexeddb/shared/IDBResultData.h:
(WebCore::IDBResultData::type):
(WebCore::IDBResultData::databaseConnectionIdentifier):

* Modules/indexeddb/shared/IDBTransactionInfo.cpp:
(WebCore::IDBTransactionInfo::IDBTransactionInfo):
(WebCore::IDBTransactionInfo::versionChange):
(WebCore::IDBTransactionInfo::isolatedCopy):
* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::identifier):
(WebCore::IDBTransactionInfo::mode):
(WebCore::IDBTransactionInfo::newVersion):

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::fireVersionChangeEvent):
* Modules/indexeddb/shared/InProcessIDBServer.h:

* WebCore.xcodeproj/project.pbxproj:

* platform/CrossThreadCopier.cpp:
(WebCore::IDBTransactionInfo&gt;::copy):
* platform/CrossThreadCopier.h:

LayoutTests:

* storage/indexeddb/modern/opendatabase-request-event-expected.txt:
* storage/indexeddb/modern/opendatabase-request-event.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventhtml">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBRequestImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyDatabaseh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientcpp">trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth">trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientDelegateh">trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServercpp">trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServerh">trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBErrorh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatacpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatah">trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifiercpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifierh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBResultDatacpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBResultDatah">trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp">trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh">trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformCrossThreadCopiercpp">trunk/Source/WebCore/platform/CrossThreadCopier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformCrossThreadCopierh">trunk/Source/WebCore/platform/CrossThreadCopier.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBAnyImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBAnyImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBVersionChangeEventImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBVersionChangeEventImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectioncpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectionh">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactionh">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBTransactionInfocpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBTransactionInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/LayoutTests/ChangeLog        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-10-12  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Start version change transaction for connections to new database.
+        https://bugs.webkit.org/show_bug.cgi?id=150033
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/modern/opendatabase-request-event-expected.txt:
+        * storage/indexeddb/modern/opendatabase-request-event.html:
+
</ins><span class="cx"> 2015-10-12  Said Abou-Hallawa  &lt;sabouhallawa@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r184895): border-image should always slice the SVG image to nine pieces when drawing it in the container element
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -1,4 +1,6 @@
</span><ins>+ALERT: Caught exception TypeError: Type error
+ALERT: Caught exception TypeError: Type error
</ins><span class="cx"> ALERT: [object IDBOpenDBRequest]
</span><del>-ALERT: error [object Event]
</del><ins>+ALERT: upgradeneeded: old version - 0 new version - 1
</ins><span class="cx"> ALERT: Done
</span><span class="cx"> This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -13,6 +13,18 @@
</span><span class="cx">         testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+try {
+    window.indexedDB.open(&quot;TestDatabase&quot;, 0);
+} catch (e) {
+    alert(&quot;Caught exception &quot; + e);
+}
+
+try {
+    window.indexedDB.open(&quot;TestDatabase&quot;, -1);
+} catch (e) {
+    alert(&quot;Caught exception &quot; + e);
+}
+
</ins><span class="cx"> var request = window.indexedDB.open(&quot;TestDatabase&quot;);
</span><span class="cx"> alert(request);
</span><span class="cx"> 
</span><span class="lines">@@ -26,4 +38,10 @@
</span><span class="cx">         alert(&quot;error &quot; + e);
</span><span class="cx">         done();
</span><span class="cx"> }
</span><ins>+
+request.onupgradeneeded = function(e)
+{
+    alert(&quot;upgradeneeded: old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
+        done();
+}
</ins><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -872,10 +872,14 @@
</span><span class="cx">     Modules/indexeddb/IDBVersionChangeEvent.cpp
</span><span class="cx">     Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
</span><span class="cx"> 
</span><ins>+    Modules/indexeddb/client/IDBAnyImpl.cpp
</ins><span class="cx">     Modules/indexeddb/client/IDBConnectionToServer.cpp
</span><ins>+    Modules/indexeddb/client/IDBDatabaseImpl.cpp
</ins><span class="cx">     Modules/indexeddb/client/IDBFactoryImpl.cpp
</span><span class="cx">     Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp
</span><span class="cx">     Modules/indexeddb/client/IDBRequestImpl.cpp
</span><ins>+    Modules/indexeddb/client/IDBTransactionImpl.cpp
+    Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp
</ins><span class="cx"> 
</span><span class="cx">     Modules/indexeddb/legacy/IDBCursorBackend.cpp
</span><span class="cx">     Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp
</span><span class="lines">@@ -902,12 +906,15 @@
</span><span class="cx">     Modules/indexeddb/server/IDBServerOperation.cpp
</span><span class="cx">     Modules/indexeddb/server/MemoryIDBBackingStore.cpp
</span><span class="cx">     Modules/indexeddb/server/UniqueIDBDatabase.cpp
</span><ins>+    Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp
+    Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp
</ins><span class="cx"> 
</span><span class="cx">     Modules/indexeddb/shared/IDBDatabaseInfo.cpp
</span><span class="cx">     Modules/indexeddb/shared/IDBError.cpp
</span><span class="cx">     Modules/indexeddb/shared/IDBRequestData.cpp
</span><span class="cx">     Modules/indexeddb/shared/IDBResourceIdentifier.cpp
</span><span class="cx">     Modules/indexeddb/shared/IDBResultData.cpp
</span><ins>+    Modules/indexeddb/shared/IDBTransactionInfo.cpp
</ins><span class="cx">     Modules/indexeddb/shared/InProcessIDBServer.cpp
</span><span class="cx"> 
</span><span class="cx">     Modules/mediacontrols/MediaControlsHost.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/ChangeLog        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -1,3 +1,186 @@
</span><ins>+2015-10-12  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Start version change transaction for connections to new database.
+        https://bugs.webkit.org/show_bug.cgi?id=150033
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Covered by changes to existing tests).
+
+        * CMakeLists.txt:
+        * Modules/indexeddb/IDBDatabase.h:
+        
+        * Modules/indexeddb/client/IDBAnyImpl.cpp:
+        (WebCore::IDBClient::IDBAny::IDBAny):
+        (WebCore::IDBClient::IDBAny::~IDBAny):
+        (WebCore::IDBClient::IDBAny::idbDatabase):
+        (WebCore::IDBClient::IDBAny::domStringList):
+        (WebCore::IDBClient::IDBAny::idbCursor):
+        (WebCore::IDBClient::IDBAny::idbCursorWithValue):
+        (WebCore::IDBClient::IDBAny::idbFactory):
+        (WebCore::IDBClient::IDBAny::idbIndex):
+        (WebCore::IDBClient::IDBAny::idbObjectStore):
+        (WebCore::IDBClient::IDBAny::idbTransaction):
+        (WebCore::IDBClient::IDBAny::scriptValue):
+        (WebCore::IDBClient::IDBAny::integer):
+        (WebCore::IDBClient::IDBAny::string):
+        (WebCore::IDBClient::IDBAny::keyPath):
+        * Modules/indexeddb/client/IDBAnyImpl.h:
+        (WebCore::IDBClient::IDBAny::create):
+        
+        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+        (WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
+        (WebCore::IDBClient::IDBConnectionToServer::registerDatabaseConnection):
+        (WebCore::IDBClient::IDBConnectionToServer::unregisterDatabaseConnection):
+        * Modules/indexeddb/client/IDBConnectionToServer.h:
+        
+        * Modules/indexeddb/client/IDBDatabaseImpl.cpp: Added.
+        (WebCore::IDBClient::IDBDatabase::create):
+        (WebCore::IDBClient::IDBDatabase::IDBDatabase):
+        (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
+        (WebCore::IDBClient::IDBDatabase::name):
+        (WebCore::IDBClient::IDBDatabase::version):
+        (WebCore::IDBClient::IDBDatabase::objectStoreNames):
+        (WebCore::IDBClient::IDBDatabase::createObjectStore):
+        (WebCore::IDBClient::IDBDatabase::transaction):
+        (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
+        (WebCore::IDBClient::IDBDatabase::close):
+        (WebCore::IDBClient::IDBDatabase::activeDOMObjectName):
+        (WebCore::IDBClient::IDBDatabase::canSuspendForPageCache):
+        (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
+        * Modules/indexeddb/client/IDBDatabaseImpl.h: Added.
+        (WebCore::IDBClient::IDBDatabase::info):
+        
+        * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
+        (WebCore::IDBClient::IDBOpenDBRequest::onError):
+        (WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
+        (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
+        (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
+        * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
+        
+        * Modules/indexeddb/client/IDBRequestImpl.cpp:
+        (WebCore::IDBClient::IDBRequest::IDBRequest):
+        (WebCore::IDBClient::IDBRequest::result):
+        (WebCore::IDBClient::IDBRequest::source):
+        (WebCore::IDBClient::IDBRequest::transaction):
+        * Modules/indexeddb/client/IDBRequestImpl.h:
+        (WebCore::IDBClient::IDBRequest::connection):
+        
+        * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+        (WebCore::IDBClient::IDBTransaction::create):
+        (WebCore::IDBClient::IDBTransaction::IDBTransaction):
+        (WebCore::IDBClient::IDBTransaction::~IDBTransaction):
+        (WebCore::IDBClient::IDBTransaction::mode):
+        (WebCore::IDBClient::IDBTransaction::db):
+        (WebCore::IDBClient::IDBTransaction::error):
+        (WebCore::IDBClient::IDBTransaction::objectStore):
+        (WebCore::IDBClient::IDBTransaction::abort):
+        (WebCore::IDBClient::IDBTransaction::activeDOMObjectName):
+        (WebCore::IDBClient::IDBTransaction::canSuspendForPageCache):
+        * Modules/indexeddb/client/IDBTransactionImpl.h:
+        (WebCore::IDBClient::IDBTransaction::info):
+        
+        * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
+        (WebCore::IDBClient::IDBVersionChangeEvent::IDBVersionChangeEvent):
+        (WebCore::IDBClient::IDBVersionChangeEvent::eventInterface):
+        * Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
+        (WebCore::IDBClient::IDBVersionChangeEvent::create):
+        
+        * Modules/indexeddb/legacy/LegacyDatabase.h:
+        
+        * Modules/indexeddb/server/IDBConnectionToClient.cpp:
+        (WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent):
+        * Modules/indexeddb/server/IDBConnectionToClient.h:
+        * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
+        
+        * Modules/indexeddb/server/IDBServer.cpp:
+        (WebCore::IDBServer::IDBServer::registerDatabaseConnection):
+        (WebCore::IDBServer::IDBServer::unregisterDatabaseConnection):
+        (WebCore::IDBServer::IDBServer::deleteDatabase):
+        * Modules/indexeddb/server/IDBServer.h:
+        
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::info):
+        (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
+        (WebCore::IDBServer::UniqueIDBDatabase::hasAnyOpenConnections):
+        (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
+        (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
+        (WebCore::IDBServer::UniqueIDBDatabase::addOpenDatabaseConnection):
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+        
+        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: 
+        (WebCore::IDBServer::nextDatabaseConnectionIdentifier):
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::create):
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
+
+        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::identifier):
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::database):
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionToClient):
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::closePending):
+        
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::create):
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::databaseConnection):
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::info):
+        
+        * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
+        (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
+        * Modules/indexeddb/shared/IDBDatabaseInfo.h:
+        (WebCore::IDBDatabaseInfo::name):
+        (WebCore::IDBDatabaseInfo::version):
+        (WebCore::IDBDatabaseInfo::IDBDatabaseInfo): Deleted.
+        
+        * Modules/indexeddb/shared/IDBError.h:
+        
+        * Modules/indexeddb/shared/IDBRequestData.cpp:
+        (WebCore::IDBRequestData::IDBRequestData):
+        (WebCore::IDBRequestData::requestedVersion):
+        * Modules/indexeddb/shared/IDBRequestData.h:
+        
+        * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
+        (WebCore::nextClientResourceNumber):
+        (WebCore::nextServerResourceNumber):
+        (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
+        (WebCore::IDBResourceIdentifier::emptyValue):
+        (WebCore::IDBResourceIdentifier::deletedValue):
+        (WebCore::nextResourceNumber): Deleted.
+        * Modules/indexeddb/shared/IDBResourceIdentifier.h:
+        
+        * Modules/indexeddb/shared/IDBResultData.cpp:
+        (WebCore::IDBResultData::IDBResultData):
+        (WebCore::IDBResultData::error):
+        (WebCore::IDBResultData::openDatabaseSuccess):
+        (WebCore::IDBResultData::openDatabaseUpgradeNeeded):
+        (WebCore::IDBResultData::databaseInfo):
+        (WebCore::IDBResultData::transactionInfo):
+        * Modules/indexeddb/shared/IDBResultData.h:
+        (WebCore::IDBResultData::type):
+        (WebCore::IDBResultData::databaseConnectionIdentifier):
+        
+        * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
+        (WebCore::IDBTransactionInfo::IDBTransactionInfo):
+        (WebCore::IDBTransactionInfo::versionChange):
+        (WebCore::IDBTransactionInfo::isolatedCopy):
+        * Modules/indexeddb/shared/IDBTransactionInfo.h:
+        (WebCore::IDBTransactionInfo::identifier):
+        (WebCore::IDBTransactionInfo::mode):
+        (WebCore::IDBTransactionInfo::newVersion):
+        
+        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+        (WebCore::InProcessIDBServer::fireVersionChangeEvent):
+        * Modules/indexeddb/shared/InProcessIDBServer.h:
+        
+        * WebCore.xcodeproj/project.pbxproj:
+        
+        * platform/CrossThreadCopier.cpp:
+        (WebCore::IDBTransactionInfo&gt;::copy):
+        * platform/CrossThreadCopier.h:
+
</ins><span class="cx"> 2015-10-12  Said Abou-Hallawa  &lt;sabouhallawa@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r184895): border-image should always slice the SVG image to nine pieces when drawing it in the container element
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include &quot;Dictionary.h&quot;
</span><span class="cx"> #include &quot;Event.h&quot;
</span><span class="cx"> #include &quot;EventTarget.h&quot;
</span><del>-#include &quot;IDBDatabaseMetadata.h&quot;
</del><span class="cx"> #include &quot;IDBObjectStore.h&quot;
</span><span class="cx"> #include &quot;IDBTransaction.h&quot;
</span><span class="cx"> #include &quot;IndexedDB.h&quot;
</span><span class="lines">@@ -63,8 +62,6 @@
</span><span class="cx">     virtual void deleteObjectStore(const String&amp; name, ExceptionCode&amp;) = 0;
</span><span class="cx">     virtual void close() = 0;
</span><span class="cx"> 
</span><del>-    virtual const IDBDatabaseMetadata metadata() const = 0;
-
</del><span class="cx">     using RefCounted&lt;IDBDatabase&gt;::ref;
</span><span class="cx">     using RefCounted&lt;IDBDatabase&gt;::deref;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBAnyImplcppfromrev190883trunkSourceWebCoreModulesindexeddbclientIDBRequestImplcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.cpp (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,113 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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;IDBAnyImpl.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBAny.h&quot;
+#include &quot;IDBCursorWithValue.h&quot;
+#include &quot;IDBFactory.h&quot;
+#include &quot;IDBIndex.h&quot;
+
+namespace WebCore {
+namespace IDBClient {
+
+IDBAny::IDBAny(Ref&lt;IDBDatabase&gt;&amp;&amp; database)
+    : m_type(IDBAny::Type::IDBDatabase)
+    , m_database(adoptRef(&amp;database.leakRef()))
+{
+}
+
+IDBAny::~IDBAny()
+{
+}
+
+RefPtr&lt;WebCore::IDBDatabase&gt; IDBAny::idbDatabase()
+{
+    ASSERT(m_type == IDBAny::Type::IDBDatabase);
+    return m_database.get();
+}
+
+RefPtr&lt;WebCore::DOMStringList&gt; IDBAny::domStringList()
+{
+    return nullptr;
+}
+
+RefPtr&lt;WebCore::IDBCursor&gt; IDBAny::idbCursor()
+{
+    return nullptr;
+}
+
+RefPtr&lt;WebCore::IDBCursorWithValue&gt; IDBAny::idbCursorWithValue()
+{
+    return nullptr;
+}
+
+RefPtr&lt;WebCore::IDBFactory&gt; IDBAny::idbFactory()
+{
+    return nullptr;
+}
+
+RefPtr&lt;WebCore::IDBIndex&gt; IDBAny::idbIndex()
+{
+    return nullptr;
+}
+
+RefPtr&lt;WebCore::IDBObjectStore&gt; IDBAny::idbObjectStore()
+{
+    return nullptr;
+}
+
+RefPtr&lt;WebCore::IDBTransaction&gt; IDBAny::idbTransaction()
+{
+    return nullptr;
+}
+
+const Deprecated::ScriptValue&amp; IDBAny::scriptValue()
+{
+    return m_scriptValue;
+}
+
+int64_t IDBAny::integer()
+{
+    return m_integer;
+}
+
+const String&amp; IDBAny::string()
+{
+    return m_string;
+}
+
+const IDBKeyPath&amp; IDBAny::keyPath()
+{
+    return m_idbKeyPath;
+}
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBAnyImplhfromrev190883trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.h (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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 IDBAnyImpl_h
+#define IDBAnyImpl_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBAny.h&quot;
+#include &quot;IDBDatabaseImpl.h&quot;
+
+namespace WebCore {
+namespace IDBClient {
+
+class IDBAny : public WebCore::IDBAny {
+public:
+    static RefPtr&lt;IDBAny&gt; create(Ref&lt;IDBDatabase&gt;&amp;&amp; database)
+    {
+        return adoptRef(new IDBAny(WTF::move(database)));
+    }
+
+    virtual ~IDBAny();
+
+    virtual Type type() const override final { return m_type; }
+    virtual RefPtr&lt;WebCore::DOMStringList&gt; domStringList() override final;
+    virtual RefPtr&lt;WebCore::IDBCursor&gt; idbCursor() override final;
+    virtual RefPtr&lt;WebCore::IDBCursorWithValue&gt; idbCursorWithValue() override final;
+    virtual RefPtr&lt;WebCore::IDBDatabase&gt; idbDatabase() override final;
+    virtual RefPtr&lt;WebCore::IDBFactory&gt; idbFactory() override final;
+    virtual RefPtr&lt;WebCore::IDBIndex&gt; idbIndex() override final;
+    virtual RefPtr&lt;WebCore::IDBObjectStore&gt; idbObjectStore() override final;
+    virtual RefPtr&lt;WebCore::IDBTransaction&gt; idbTransaction() override final;
+    virtual const Deprecated::ScriptValue&amp; scriptValue() override final;
+    virtual int64_t integer() override final;
+    virtual const String&amp; string() override final;
+    virtual const IDBKeyPath&amp; keyPath() override final;
+
+private:
+    IDBAny(Ref&lt;IDBDatabase&gt;&amp;&amp;);
+
+    IDBAny::Type m_type { IDBAny::Type::Undefined };
+    RefPtr&lt;IDBDatabase&gt; m_database;
+
+    const IDBKeyPath m_idbKeyPath;
+    const Deprecated::ScriptValue m_scriptValue;
+    const String m_string;
+    const int64_t m_integer { 0 };
+};
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBAnyImpl_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -93,6 +93,25 @@
</span><span class="cx">     request-&gt;requestCompleted(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBConnectionToServer::fireVersionChangeEvent(uint64_t /*databaseConnectionIdentifier*/ , uint64_t /*requestedVersion*/)
+{
+    LOG(IndexedDB, &quot;IDBConnectionToServer::fireVersionChangeEvent&quot;);
+
+    // FIXME: Implement versionchange events firing on already-open transactions.
+}
+
+void IDBConnectionToServer::registerDatabaseConnection(IDBDatabase&amp; database)
+{
+    ASSERT(!m_databaseConnections.contains(&amp;database));
+    m_databaseConnections.add(&amp;database);
+}
+
+void IDBConnectionToServer::unregisterDatabaseConnection(IDBDatabase&amp; database)
+{
+    ASSERT(m_databaseConnections.contains(&amp;database));
+    m_databaseConnections.remove(&amp;database);
+}
+
</ins><span class="cx"> } // namespace IDBClient
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;IDBConnectionToServerDelegate.h&quot;
</span><span class="cx"> #include &quot;IDBResourceIdentifier.h&quot;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><ins>+#include &lt;wtf/HashSet.h&gt;
</ins><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -40,6 +41,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace IDBClient {
</span><span class="cx"> 
</span><ins>+class IDBDatabase;
</ins><span class="cx"> class IDBOpenDBRequest;
</span><span class="cx"> 
</span><span class="cx"> class IDBConnectionToServer : public RefCounted&lt;IDBConnectionToServer&gt; {
</span><span class="lines">@@ -54,12 +56,18 @@
</span><span class="cx">     void openDatabase(IDBOpenDBRequest&amp;);
</span><span class="cx">     void didOpenDatabase(const IDBResultData&amp;);
</span><span class="cx"> 
</span><ins>+    void fireVersionChangeEvent(uint64_t databaseConnectionIdentifier, uint64_t requestedVersion);
+
+    void registerDatabaseConnection(IDBDatabase&amp;);
+    void unregisterDatabaseConnection(IDBDatabase&amp;);
+
</ins><span class="cx"> private:
</span><span class="cx">     IDBConnectionToServer(IDBConnectionToServerDelegate&amp;);
</span><span class="cx">     
</span><span class="cx">     Ref&lt;IDBConnectionToServerDelegate&gt; m_delegate;
</span><span class="cx"> 
</span><span class="cx">     HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBClient::IDBOpenDBRequest&gt;&gt; m_openDBRequestMap;
</span><ins>+    HashSet&lt;RefPtr&lt;IDBDatabase&gt;&gt; m_databaseConnections;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace IDBClient
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,139 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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;IDBDatabaseImpl.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBConnectionToServer.h&quot;
+#include &quot;IDBOpenDBRequestImpl.h&quot;
+#include &quot;IDBResultData.h&quot;
+#include &quot;IDBTransactionImpl.h&quot;
+#include &quot;Logging.h&quot;
+
+namespace WebCore {
+namespace IDBClient {
+
+Ref&lt;IDBDatabase&gt; IDBDatabase::create(ScriptExecutionContext&amp; context, IDBConnectionToServer&amp; connection, const IDBResultData&amp; resultData)
+{
+    return adoptRef(*new IDBDatabase(context, connection, resultData));
+}
+
+IDBDatabase::IDBDatabase(ScriptExecutionContext&amp; context, IDBConnectionToServer&amp; connection, const IDBResultData&amp; resultData)
+    : WebCore::IDBDatabase(&amp;context)
+    , m_connection(connection)
+    , m_info(resultData.databaseInfo())
+{
+    suspendIfNeeded();
+    relaxAdoptionRequirement();
+    m_connection-&gt;registerDatabaseConnection(*this);
+}
+
+IDBDatabase::~IDBDatabase()
+{
+    m_connection-&gt;unregisterDatabaseConnection(*this);
+}
+
+const String IDBDatabase::name() const
+{
+    return m_info.name();
+}
+
+uint64_t IDBDatabase::version() const
+{
+    return m_info.version();
+}
+
+RefPtr&lt;DOMStringList&gt; IDBDatabase::objectStoreNames() const
+{
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+RefPtr&lt;IDBObjectStore&gt; IDBDatabase::createObjectStore(const String&amp;, const Dictionary&amp;, ExceptionCode&amp;)
+{
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+RefPtr&lt;IDBObjectStore&gt; IDBDatabase::createObjectStore(const String&amp;, const IDBKeyPath&amp;, bool, ExceptionCode&amp;)
+{
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+RefPtr&lt;WebCore::IDBTransaction&gt; IDBDatabase::transaction(ScriptExecutionContext*, const Vector&lt;String&gt;&amp;, const String&amp;, ExceptionCode&amp;)
+{
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+RefPtr&lt;WebCore::IDBTransaction&gt; IDBDatabase::transaction(ScriptExecutionContext*, const String&amp;, const String&amp;, ExceptionCode&amp;)
+{
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+void IDBDatabase::deleteObjectStore(const String&amp;, ExceptionCode&amp;)
+{
+    ASSERT_NOT_REACHED();
+}
+
+void IDBDatabase::close()
+{
+    ASSERT_NOT_REACHED();
+}
+
+const char* IDBDatabase::activeDOMObjectName() const
+{
+    return &quot;IDBDatabase&quot;;
+}
+
+bool IDBDatabase::canSuspendForPageCache() const
+{
+    // FIXME: This value will sometimes be false when database operations are actually in progress.
+    // Such database operations do not yet exist.
+    return true;
+}
+
+Ref&lt;IDBTransaction&gt; IDBDatabase::startVersionChangeTransaction(const IDBTransactionInfo&amp; info)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::startVersionChangeTransaction&quot;);
+
+    ASSERT(!m_versionChangeTransaction);
+    ASSERT(info.mode() == IndexedDB::TransactionMode::VersionChange);
+
+    Ref&lt;IDBTransaction&gt; transaction = IDBTransaction::create(*this, info);
+    m_versionChangeTransaction = &amp;transaction.get();
+    m_activeTransactions.set(transaction-&gt;info().identifier(), &amp;transaction.get());
+
+    return WTF::move(transaction);
+}
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,90 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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 IDBDatabaseImpl_h
+#define IDBDatabaseImpl_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBConnectionToServer.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBDatabaseInfo.h&quot;
+
+namespace WebCore {
+
+class IDBResultData;
+class IDBTransaction;
+class IDBTransactionInfo;
+
+namespace IDBClient {
+
+class IDBTransaction;
+
+class IDBDatabase : public WebCore::IDBDatabase {
+public:
+    static Ref&lt;IDBDatabase&gt; create(ScriptExecutionContext&amp;, IDBConnectionToServer&amp;, const IDBResultData&amp;);
+
+    virtual ~IDBDatabase();
+
+    // IDBDatabase IDL
+    virtual const String name() const override final;
+    virtual uint64_t version() const override final;
+    virtual RefPtr&lt;DOMStringList&gt; objectStoreNames() const override final;
+
+    virtual RefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const Dictionary&amp;, ExceptionCode&amp;) override final;
+    virtual RefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const IDBKeyPath&amp;, bool autoIncrement, ExceptionCode&amp;) override final;
+    virtual RefPtr&lt;WebCore::IDBTransaction&gt; transaction(ScriptExecutionContext*, const Vector&lt;String&gt;&amp;, const String&amp; mode, ExceptionCode&amp;) override final;
+    virtual RefPtr&lt;WebCore::IDBTransaction&gt; transaction(ScriptExecutionContext*, const String&amp;, const String&amp; mode, ExceptionCode&amp;) override final;
+    virtual void deleteObjectStore(const String&amp; name, ExceptionCode&amp;) override final;
+    virtual void close() override final;
+
+    // EventTarget
+    virtual EventTargetInterface eventTargetInterface() const override final { return IDBDatabaseEventTargetInterfaceType; }
+    virtual ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
+    virtual void refEventTarget() override final { ref(); }
+    virtual void derefEventTarget() override final { deref(); }
+
+    virtual const char* activeDOMObjectName() const override final;
+    virtual bool canSuspendForPageCache() const override final;
+
+    const IDBDatabaseInfo&amp; info() const { return m_info; }
+
+    Ref&lt;IDBTransaction&gt; startVersionChangeTransaction(const IDBTransactionInfo&amp;);
+
+private:
+    IDBDatabase(ScriptExecutionContext&amp;, IDBConnectionToServer&amp;, const IDBResultData&amp;);
+
+    Ref&lt;IDBConnectionToServer&gt; m_connection;
+    IDBDatabaseInfo m_info;
+
+    RefPtr&lt;IDBTransaction&gt; m_versionChangeTransaction;
+    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_activeTransactions;
+};
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBDatabaseImpl_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -28,8 +28,11 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBDatabaseImpl.h&quot;
</ins><span class="cx"> #include &quot;IDBError.h&quot;
</span><span class="cx"> #include &quot;IDBResultData.h&quot;
</span><ins>+#include &quot;IDBTransactionImpl.h&quot;
+#include &quot;IDBVersionChangeEventImpl.h&quot;
</ins><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -59,16 +62,52 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+
+void IDBOpenDBRequest::onError(const IDBResultData&amp; data)
+{
+    m_domError = DOMError::create(data.error().name());
+    enqueueEvent(Event::create(eventNames().errorEvent, true, true));
+}
+
+void IDBOpenDBRequest::onSuccess(const IDBResultData&amp;)
+{
+    // FIXME: Implement
+}
+
+void IDBOpenDBRequest::onUpgradeNeeded(const IDBResultData&amp; resultData)
+{
+    Ref&lt;IDBDatabase&gt; database = IDBDatabase::create(*scriptExecutionContext(), connection(), resultData);
+    Ref&lt;IDBTransaction&gt; transaction = database-&gt;startVersionChangeTransaction(resultData.transactionInfo());
+
+    ASSERT(transaction-&gt;info().mode() == IndexedDB::TransactionMode::VersionChange);
+
+    uint64_t oldVersion = database-&gt;info().version();
+    uint64_t newVersion = transaction-&gt;info().newVersion();
+
+    LOG(IndexedDB, &quot;IDBOpenDBRequest::onUpgradeNeeded() - current version is %llu, new is %llu&quot;, oldVersion, newVersion);
+
+    m_result = IDBAny::create(WTF::move(database));
+    m_readyState = IDBRequestReadyState::Done;
+    m_transaction = adoptRef(&amp;transaction.leakRef());
+
+    enqueueEvent(IDBVersionChangeEvent::create(oldVersion, newVersion, eventNames().upgradeneededEvent));
+}
+
</ins><span class="cx"> void IDBOpenDBRequest::requestCompleted(const IDBResultData&amp; data)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBOpenDBRequest::requestCompleted&quot;);
</span><span class="cx"> 
</span><del>-    if (!data.error().isNull()) {
-        LOG(IndexedDB, &quot;  with error: (%s) '%s'&quot;, data.error().name().utf8().data(), data.error().message().utf8().data());
-        m_domError = DOMError::create(data.error().name());
-        enqueueEvent(Event::create(eventNames().errorEvent, true, true));
-    } else
-        enqueueEvent(Event::create(eventNames().successEvent, true, true));
</del><ins>+    switch (data.type()) {
+    case IDBResultType::Error:
+        onError(data);
+        break;
+    case IDBResultType::OpenDatabaseSuccess:
+        onSuccess(data);
+        break;
+    case IDBResultType::OpenDatabaseUpgradeNeeded:
+        onUpgradeNeeded(data);
+        break;
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace IDBClient
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -54,7 +54,11 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     IDBOpenDBRequest(IDBConnectionToServer&amp;, ScriptExecutionContext*, const IDBDatabaseIdentifier&amp;, uint64_t version);
</span><del>-    
</del><ins>+
+    void onError(const IDBResultData&amp;);
+    void onSuccess(const IDBResultData&amp;);
+    void onUpgradeNeeded(const IDBResultData&amp;);
+
</ins><span class="cx">     IDBDatabaseIdentifier m_databaseIdentifier;
</span><span class="cx">     uint64_t m_version;
</span><span class="cx">     RefPtr&lt;DOMError&gt; m_domError;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBRequestImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -37,11 +37,12 @@
</span><span class="cx"> 
</span><span class="cx"> IDBRequest::IDBRequest(IDBConnectionToServer&amp; connection, ScriptExecutionContext* context)
</span><span class="cx">     : IDBOpenDBRequest(context)
</span><ins>+    , m_connection(connection)
</ins><span class="cx">     , m_resourceIdentifier(connection)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBAny&gt; IDBRequest::result(ExceptionCode&amp;) const
</del><ins>+RefPtr&lt;WebCore::IDBAny&gt; IDBRequest::result(ExceptionCode&amp;) const
</ins><span class="cx"> {
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -56,14 +57,14 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBAny&gt; IDBRequest::source() const
</del><ins>+RefPtr&lt;WebCore::IDBAny&gt; IDBRequest::source() const
</ins><span class="cx"> {
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBTransaction&gt; IDBRequest::transaction() const
</del><ins>+RefPtr&lt;WebCore::IDBTransaction&gt; IDBRequest::transaction() const
</ins><span class="cx"> {
</span><del>-    return nullptr;
</del><ins>+    return m_transaction;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const String&amp; IDBRequest::readyState() const
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -28,8 +28,10 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBAnyImpl.h&quot;
</ins><span class="cx"> #include &quot;IDBOpenDBRequest.h&quot;
</span><span class="cx"> #include &quot;IDBResourceIdentifier.h&quot;
</span><ins>+#include &quot;IDBTransactionImpl.h&quot;
</ins><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -45,11 +47,11 @@
</span><span class="cx"> public:
</span><span class="cx">     const IDBResourceIdentifier&amp; resourceIdentifier() const { return m_resourceIdentifier; }
</span><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBAny&gt; result(ExceptionCode&amp;) const override;
</del><ins>+    virtual RefPtr&lt;WebCore::IDBAny&gt; result(ExceptionCode&amp;) const override;
</ins><span class="cx">     virtual unsigned short errorCode(ExceptionCode&amp;) const override;
</span><span class="cx">     virtual RefPtr&lt;DOMError&gt; error(ExceptionCode&amp;) const override;
</span><del>-    virtual RefPtr&lt;IDBAny&gt; source() const override;
-    virtual RefPtr&lt;IDBTransaction&gt; transaction() const override;
</del><ins>+    virtual RefPtr&lt;WebCore::IDBAny&gt; source() const override;
+    virtual RefPtr&lt;WebCore::IDBTransaction&gt; transaction() const override;
</ins><span class="cx">     virtual const String&amp; readyState() const override;
</span><span class="cx"> 
</span><span class="cx">     // EventTarget
</span><span class="lines">@@ -60,7 +62,9 @@
</span><span class="cx">     using RefCounted&lt;IDBRequest&gt;::deref;
</span><span class="cx"> 
</span><span class="cx">     void enqueueEvent(Ref&lt;Event&gt;&amp;&amp;);
</span><del>-    
</del><ins>+
+    IDBConnectionToServer&amp; connection() { return m_connection; }
+
</ins><span class="cx"> protected:
</span><span class="cx">     IDBRequest(IDBConnectionToServer&amp;, ScriptExecutionContext*);
</span><span class="cx"> 
</span><span class="lines">@@ -72,6 +76,12 @@
</span><span class="cx">     virtual void refEventTarget() override final { RefCounted&lt;IDBRequest&gt;::ref(); }
</span><span class="cx">     virtual void derefEventTarget() override final { RefCounted&lt;IDBRequest&gt;::deref(); }
</span><span class="cx"> 
</span><ins>+    IDBRequestReadyState m_readyState { IDBRequestReadyState::Pending };
+    RefPtr&lt;IDBAny&gt; m_result;
+    RefPtr&lt;IDBTransaction&gt; m_transaction;
+
+private:
+    IDBConnectionToServer&amp; m_connection;
</ins><span class="cx">     IDBResourceIdentifier m_resourceIdentifier;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcppfromrev190883trunkSourceWebCoreModulesindexeddbclientIDBRequestImplcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,104 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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;IDBTransactionImpl.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;DOMError.h&quot;
+#include &quot;IDBDatabaseImpl.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+
+namespace WebCore {
+namespace IDBClient {
+
+Ref&lt;IDBTransaction&gt; IDBTransaction::create(IDBDatabase&amp; database, const IDBTransactionInfo&amp; info)
+{
+    return adoptRef(*new IDBTransaction(database, info));
+}
+
+IDBTransaction::IDBTransaction(IDBDatabase&amp; database, const IDBTransactionInfo&amp; info)
+    : WebCore::IDBTransaction(database.scriptExecutionContext())
+    , m_info(info)
+{
+    suspendIfNeeded();
+}
+
+IDBTransaction::~IDBTransaction()
+{
+}
+
+const String&amp; IDBTransaction::mode() const
+{
+    switch (m_info.mode()) {
+    case IndexedDB::TransactionMode::ReadOnly:
+        return IDBTransaction::modeReadOnly();
+    case IndexedDB::TransactionMode::ReadWrite:
+        return IDBTransaction::modeReadWrite();
+    case IndexedDB::TransactionMode::VersionChange:
+        return IDBTransaction::modeVersionChange();
+    }
+
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
+WebCore::IDBDatabase* IDBTransaction::db() const
+{
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+RefPtr&lt;DOMError&gt; IDBTransaction::error() const
+{
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+RefPtr&lt;IDBObjectStore&gt; IDBTransaction::objectStore(const String&amp;, ExceptionCode&amp;)
+{
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+void IDBTransaction::abort(ExceptionCode&amp;)
+{
+    ASSERT_NOT_REACHED();
+}
+
+const char* IDBTransaction::activeDOMObjectName() const
+{
+    return &quot;IDBTransaction&quot;;
+}
+
+bool IDBTransaction::canSuspendForPageCache() const
+{
+    return false;
+}
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplhfromrev190883trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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 IDBTransactionImpl_h
+#define IDBTransactionImpl_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBTransaction.h&quot;
+#include &quot;IDBTransactionInfo.h&quot;
+
+namespace WebCore {
+namespace IDBClient {
+
+class IDBDatabase;
+
+class IDBTransaction : public WebCore::IDBTransaction {
+public:
+    static Ref&lt;IDBTransaction&gt; create(IDBDatabase&amp;, const IDBTransactionInfo&amp;);
+
+    virtual ~IDBTransaction() override final;
+
+    // IDBTransaction IDL
+    virtual const String&amp; mode() const override final;
+    virtual WebCore::IDBDatabase* db() const override final;
+    virtual RefPtr&lt;DOMError&gt; error() const override final;
+    virtual RefPtr&lt;IDBObjectStore&gt; objectStore(const String&amp; name, ExceptionCode&amp;) override final;
+    virtual void abort(ExceptionCode&amp;) override final;
+
+    virtual EventTargetInterface eventTargetInterface() const override final { return IDBTransactionEventTargetInterfaceType; }
+    virtual ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
+    virtual void refEventTarget() override final { ref(); }
+    virtual void derefEventTarget() override final { deref(); }
+
+    virtual const char* activeDOMObjectName() const override final;
+    virtual bool canSuspendForPageCache() const override final;
+
+    const IDBTransactionInfo info() const { return m_info; }
+
+private:
+    IDBTransaction(IDBDatabase&amp;, const IDBTransactionInfo&amp;);
+
+    IDBTransactionInfo m_info;
+};
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBTransactionImpl_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBVersionChangeEventImplcppfromrev190883trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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;IDBVersionChangeEventImpl.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+namespace IDBClient {
+
+IDBVersionChangeEvent::IDBVersionChangeEvent(uint64_t oldVersion, uint64_t newVersion, const AtomicString&amp; eventType)
+    : WebCore::IDBVersionChangeEvent(eventType)
+    , m_oldVersion(oldVersion)
+    , m_newVersion(newVersion)
+{
+}
+
+EventInterface IDBVersionChangeEvent::eventInterface() const
+{
+    return IDBVersionChangeEventInterfaceType;
+}
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBVersionChangeEventImplhfromrev190883trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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 IDBVersionChangeEventImpl_h
+#define IDBVersionChangeEventImpl_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBVersionChangeEvent.h&quot;
+
+namespace WebCore {
+namespace IDBClient {
+
+class IDBVersionChangeEvent : public WebCore::IDBVersionChangeEvent {
+public:
+    static Ref&lt;IDBVersionChangeEvent&gt; create(uint64_t oldVersion = 0, uint64_t newVersion = 0, const AtomicString&amp; eventType = AtomicString())
+    {
+        return adoptRef(*new IDBVersionChangeEvent(oldVersion, newVersion, eventType));
+    }
+
+    virtual uint64_t oldVersion() const override final { return m_oldVersion; }
+    virtual uint64_t newVersion() const override final { return m_newVersion; }
+
+    virtual EventInterface eventInterface() const override final;
+
+private:
+    IDBVersionChangeEvent(uint64_t oldVersion, uint64_t newVersion, const AtomicString&amp; eventType);
+
+    uint64_t m_oldVersion { 0 };
+    uint64_t m_newVersion { 0 };
+};
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBVersionChangeEventImpl_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool isClosePending() const { return m_closePending; }
</span><span class="cx">     void forceClose();
</span><del>-    virtual const IDBDatabaseMetadata metadata() const override final { return m_metadata; }
</del><ins>+    const IDBDatabaseMetadata metadata() const { return m_metadata; }
</ins><span class="cx">     void enqueueEvent(PassRefPtr&lt;Event&gt;);
</span><span class="cx"> 
</span><span class="cx">     using EventTarget::dispatchEvent;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;UniqueIDBDatabaseConnection.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> namespace IDBServer {
</span><span class="cx"> 
</span><span class="lines">@@ -56,6 +58,11 @@
</span><span class="cx">     m_delegate-&gt;didOpenDatabase(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBConnectionToClient::fireVersionChangeEvent(UniqueIDBDatabaseConnection&amp; connection, uint64_t requestedVersion)
+{
+    m_delegate-&gt;fireVersionChangeEvent(connection, requestedVersion);
+}
+
</ins><span class="cx"> } // namespace IDBServer
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -38,6 +38,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace IDBServer {
</span><span class="cx"> 
</span><ins>+class UniqueIDBDatabaseConnection;
+
</ins><span class="cx"> class IDBConnectionToClient : public RefCounted&lt;IDBConnectionToClient&gt; {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;IDBConnectionToClient&gt; create(IDBConnectionToClientDelegate&amp;);
</span><span class="lines">@@ -46,7 +48,9 @@
</span><span class="cx"> 
</span><span class="cx">     void didDeleteDatabase(const IDBResultData&amp;);
</span><span class="cx">     void didOpenDatabase(const IDBResultData&amp;);
</span><del>-    
</del><ins>+
+    void fireVersionChangeEvent(UniqueIDBDatabaseConnection&amp;, uint64_t requestedVersion);
+
</ins><span class="cx"> private:
</span><span class="cx">     IDBConnectionToClient(IDBConnectionToClientDelegate&amp;);
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -34,6 +34,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace IDBServer {
</span><span class="cx"> 
</span><ins>+class UniqueIDBDatabaseConnection;
+
</ins><span class="cx"> class IDBConnectionToClientDelegate {
</span><span class="cx"> public:
</span><span class="cx">     virtual ~IDBConnectionToClientDelegate() { }
</span><span class="lines">@@ -43,6 +45,8 @@
</span><span class="cx">     virtual void didDeleteDatabase(const IDBResultData&amp;) = 0;
</span><span class="cx">     virtual void didOpenDatabase(const IDBResultData&amp;) = 0;
</span><span class="cx"> 
</span><ins>+    virtual void fireVersionChangeEvent(UniqueIDBDatabaseConnection&amp;, uint64_t requestedVersion) = 0;
+
</ins><span class="cx">     virtual void ref() = 0;
</span><span class="cx">     virtual void deref() = 0;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -63,6 +63,18 @@
</span><span class="cx">     m_connectionMap.remove(connection.identifier());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBServer::registerDatabaseConnection(UniqueIDBDatabaseConnection&amp; connection)
+{
+    ASSERT(!m_databaseConnections.contains(connection.identifier()));
+    m_databaseConnections.set(connection.identifier(), &amp;connection);
+}
+
+void IDBServer::unregisterDatabaseConnection(UniqueIDBDatabaseConnection&amp; connection)
+{
+    ASSERT(m_databaseConnections.contains(connection.identifier()));
+    m_databaseConnections.remove(connection.identifier());
+}
+
</ins><span class="cx"> UniqueIDBDatabase&amp; IDBServer::getOrCreateUniqueIDBDatabase(const IDBDatabaseIdentifier&amp; identifier)
</span><span class="cx"> {
</span><span class="cx">     auto uniqueIDBDatabase = m_uniqueIDBDatabaseMap.add(identifier, nullptr);
</span><span class="lines">@@ -112,7 +124,7 @@
</span><span class="cx">     
</span><span class="cx">     // FIXME: During bringup of modern IDB, the database deletion is a no-op, and is
</span><span class="cx">     // immediately reported back to the WebProcess as failure.
</span><del>-    IDBResultData result(requestData.requestIdentifier(), IDBError(IDBExceptionCode::Unknown));
</del><ins>+    auto result = IDBResultData::error(requestData.requestIdentifier(), IDBError(IDBExceptionCode::Unknown));
</ins><span class="cx">     connection-&gt;didDeleteDatabase(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;IDBConnectionToClient.h&quot;
</span><span class="cx"> #include &quot;IDBDatabaseIdentifier.h&quot;
</span><span class="cx"> #include &quot;UniqueIDBDatabase.h&quot;
</span><ins>+#include &quot;UniqueIDBDatabaseConnection.h&quot;
</ins><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/Lock.h&gt;
</span><span class="cx"> #include &lt;wtf/MessageQueue.h&gt;
</span><span class="lines">@@ -60,6 +61,9 @@
</span><span class="cx">     void postDatabaseTask(std::unique_ptr&lt;CrossThreadTask&gt;&amp;&amp;);
</span><span class="cx">     void postDatabaseTaskReply(std::unique_ptr&lt;CrossThreadTask&gt;&amp;&amp;);
</span><span class="cx"> 
</span><ins>+    void registerDatabaseConnection(UniqueIDBDatabaseConnection&amp;);
+    void unregisterDatabaseConnection(UniqueIDBDatabaseConnection&amp;);
+
</ins><span class="cx">     std::unique_ptr&lt;IDBBackingStore&gt; createBackingStore(const IDBDatabaseIdentifier&amp;);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -81,6 +85,8 @@
</span><span class="cx"> 
</span><span class="cx">     MessageQueue&lt;CrossThreadTask&gt; m_databaseQueue;
</span><span class="cx">     MessageQueue&lt;CrossThreadTask&gt; m_databaseReplyQueue;
</span><ins>+
+    HashMap&lt;uint64_t, UniqueIDBDatabaseConnection*&gt; m_databaseConnections;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace IDBServer
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;IDBResultData.h&quot;
</span><span class="cx"> #include &quot;IDBServer.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><ins>+#include &quot;UniqueIDBDatabaseConnection.h&quot;
</ins><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="cx"> #include &lt;wtf/ThreadSafeRefCounted.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -43,6 +44,12 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+const IDBDatabaseInfo&amp; UniqueIDBDatabase::info() const
+{
+    RELEASE_ASSERT(m_databaseInfo);
+    return *m_databaseInfo;
+}
+
</ins><span class="cx"> void UniqueIDBDatabase::openDatabaseConnection(IDBConnectionToClient&amp; connection, const IDBRequestData&amp; requestData)
</span><span class="cx"> {
</span><span class="cx">     auto operation = IDBServerOperation::create(connection, requestData);
</span><span class="lines">@@ -63,13 +70,105 @@
</span><span class="cx"> 
</span><span class="cx">     auto operation = m_pendingOpenDatabaseOperations.takeFirst();
</span><span class="cx"> 
</span><del>-    // FIXME: Reporting open operations as failures for now.
-    // Creating database connections for success will be the next step.
</del><ins>+    // 3.3.1 Opening a database
+    // If requested version is undefined, then let requested version be 1 if db was created in the previous step,
+    // or the current version of db otherwise.
+    uint64_t requestedVersion = operation-&gt;requestData().requestedVersion();
+    if (!requestedVersion)
+        requestedVersion = m_databaseInfo-&gt;version() ? m_databaseInfo-&gt;version() : 1;
</ins><span class="cx"> 
</span><del>-    IDBResultData result(operation-&gt;requestData().requestIdentifier(), IDBError(IDBExceptionCode::Unknown));
</del><ins>+    // 3.3.1 Opening a database
+    // If the database version higher than the requested version, abort these steps and return a VersionError.
+    if (requestedVersion &lt; m_databaseInfo-&gt;version()) {
+        auto result = IDBResultData::error(operation-&gt;requestData().requestIdentifier(), IDBError(IDBExceptionCode::VersionError));
+        operation-&gt;connection().didOpenDatabase(result);
+        return;
+    }
+
+    Ref&lt;UniqueIDBDatabaseConnection&gt; connection = UniqueIDBDatabaseConnection::create(*this, operation-&gt;connection());
+    UniqueIDBDatabaseConnection* rawConnection = &amp;connection.get();
+    m_server.registerDatabaseConnection(*rawConnection);
+
+    if (requestedVersion == m_databaseInfo-&gt;version()) {
+        addOpenDatabaseConnection(WTF::move(connection));
+
+        auto result = IDBResultData::openDatabaseSuccess(operation-&gt;requestData().requestIdentifier(), *rawConnection);
+        operation-&gt;connection().didOpenDatabase(result);
+        return;
+    }
+
+    ASSERT(!m_versionChangeOperation);
+    ASSERT(!m_versionChangeDatabaseConnection);
+
+    m_versionChangeOperation = adoptRef(operation.leakRef());
+    m_versionChangeDatabaseConnection = rawConnection;
+
+    // 3.3.7 &quot;versionchange&quot; transaction steps
+    // If there's no other open connections to this database, the version change process can begin immediately.
+    if (!hasAnyOpenConnections()) {
+        startVersionChangeTransaction();
+        return;
+    }
+
+    // Otherwise we have to notify all those open connections and wait for them to close.
+    notifyConnectionsOfVersionChange();
+}
+
+bool UniqueIDBDatabase::hasAnyOpenConnections() const
+{
+    return !m_openDatabaseConnections.isEmpty();
+}
+
+void UniqueIDBDatabase::startVersionChangeTransaction()
+{
+    LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::startVersionChangeTransaction&quot;);
+
+    ASSERT(!m_versionChangeTransaction);
+    ASSERT(m_versionChangeOperation);
+    ASSERT(m_versionChangeDatabaseConnection);
+
+    auto operation = m_versionChangeOperation;
+    m_versionChangeOperation = nullptr;
+
+    uint64_t requestedVersion = operation-&gt;requestData().requestedVersion();
+    if (!requestedVersion)
+        requestedVersion = m_databaseInfo-&gt;version() ? m_databaseInfo-&gt;version() : 1;
+
+    addOpenDatabaseConnection(*m_versionChangeDatabaseConnection);
+
+    m_versionChangeTransaction = m_versionChangeDatabaseConnection-&gt;createVersionChangeTransaction(requestedVersion);
+    m_inProgressTransactions.set(m_versionChangeTransaction-&gt;info().identifier(), m_versionChangeTransaction);
+
+    auto result = IDBResultData::openDatabaseUpgradeNeeded(operation-&gt;requestData().requestIdentifier(), *m_versionChangeTransaction);
</ins><span class="cx">     operation-&gt;connection().didOpenDatabase(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UniqueIDBDatabase::notifyConnectionsOfVersionChange()
+{
+    ASSERT(m_versionChangeOperation);
+    ASSERT(m_versionChangeDatabaseConnection);
+
+    uint64_t requestedVersion = m_versionChangeOperation-&gt;requestData().requestedVersion();
+
+    LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::notifyConnectionsOfVersionChange - %llu&quot;, requestedVersion);
+
+    // 3.3.7 &quot;versionchange&quot; transaction steps
+    // Fire a versionchange event at each connection in m_openDatabaseConnections that is open.
+    // The event must not be fired on connections which has the closePending flag set.
+    for (auto connection : m_openDatabaseConnections) {
+        if (connection-&gt;closePending())
+            continue;
+
+        connection-&gt;fireVersionChangeEvent(requestedVersion);
+    }
+}
+
+void UniqueIDBDatabase::addOpenDatabaseConnection(Ref&lt;UniqueIDBDatabaseConnection&gt;&amp;&amp; connection)
+{
+    ASSERT(!m_openDatabaseConnections.contains(&amp;connection.get()));
+    m_openDatabaseConnections.add(adoptRef(connection.leakRef()));
+}
+
</ins><span class="cx"> void UniqueIDBDatabase::openBackingStore(const IDBDatabaseIdentifier&amp; identifier)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -32,7 +32,10 @@
</span><span class="cx"> #include &quot;IDBDatabaseIdentifier.h&quot;
</span><span class="cx"> #include &quot;IDBDatabaseInfo.h&quot;
</span><span class="cx"> #include &quot;IDBServerOperation.h&quot;
</span><ins>+#include &quot;UniqueIDBDatabaseConnection.h&quot;
+#include &quot;UniqueIDBDatabaseTransaction.h&quot;
</ins><span class="cx"> #include &lt;wtf/Deque.h&gt;
</span><ins>+#include &lt;wtf/HashSet.h&gt;
</ins><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><span class="cx"> #include &lt;wtf/ThreadSafeRefCounted.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -54,10 +57,17 @@
</span><span class="cx"> 
</span><span class="cx">     void openDatabaseConnection(IDBConnectionToClient&amp;, const IDBRequestData&amp;);
</span><span class="cx"> 
</span><ins>+    const IDBDatabaseInfo&amp; info() const;
+
</ins><span class="cx"> private:
</span><span class="cx">     UniqueIDBDatabase(IDBServer&amp;, const IDBDatabaseIdentifier&amp;);
</span><span class="cx">     
</span><span class="cx">     void handleOpenDatabaseOperations();
</span><ins>+    void addOpenDatabaseConnection(Ref&lt;UniqueIDBDatabaseConnection&gt;&amp;&amp;);
+    bool hasAnyOpenConnections() const;
+
+    void startVersionChangeTransaction();
+    void notifyConnectionsOfVersionChange();
</ins><span class="cx">     
</span><span class="cx">     // Database thread operations
</span><span class="cx">     void openBackingStore(const IDBDatabaseIdentifier&amp;);
</span><span class="lines">@@ -69,7 +79,15 @@
</span><span class="cx">     IDBDatabaseIdentifier m_identifier;
</span><span class="cx">     
</span><span class="cx">     Deque&lt;Ref&lt;IDBServerOperation&gt;&gt; m_pendingOpenDatabaseOperations;
</span><del>-    
</del><ins>+
+    HashSet&lt;RefPtr&lt;UniqueIDBDatabaseConnection&gt;&gt; m_openDatabaseConnections;
+
+    RefPtr&lt;IDBServerOperation&gt; m_versionChangeOperation;
+    RefPtr&lt;UniqueIDBDatabaseConnection&gt; m_versionChangeDatabaseConnection;
+
+    RefPtr&lt;UniqueIDBDatabaseTransaction&gt; m_versionChangeTransaction;
+    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;UniqueIDBDatabaseTransaction&gt;&gt; m_inProgressTransactions;
+
</ins><span class="cx">     std::unique_ptr&lt;IDBBackingStore&gt; m_backingStore;
</span><span class="cx">     std::unique_ptr&lt;IDBDatabaseInfo&gt; m_databaseInfo;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectioncppfromrev190883trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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;UniqueIDBDatabaseConnection.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBConnectionToClient.h&quot;
+#include &quot;IDBTransactionInfo.h&quot;
+#include &quot;Logging.h&quot;
+
+namespace WebCore {
+namespace IDBServer {
+
+static uint64_t nextDatabaseConnectionIdentifier()
+{
+    static uint64_t nextIdentifier = 0;
+    return ++nextIdentifier;
+}
+
+Ref&lt;UniqueIDBDatabaseConnection&gt; UniqueIDBDatabaseConnection::create(UniqueIDBDatabase&amp; database, IDBConnectionToClient&amp; connection)
+{
+    return adoptRef(*new UniqueIDBDatabaseConnection(database, connection));
+}
+
+UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection(UniqueIDBDatabase&amp; database, IDBConnectionToClient&amp; connection)
+    : m_identifier(nextDatabaseConnectionIdentifier())
+    , m_database(database)
+    , m_connectionToClient(connection)
+{
+}
+
+void UniqueIDBDatabaseConnection::fireVersionChangeEvent(uint64_t requestedVersion)
+{
+    ASSERT(!m_closePending);
+    m_connectionToClient.fireVersionChangeEvent(*this, requestedVersion);
+}
+
+Ref&lt;UniqueIDBDatabaseTransaction&gt; UniqueIDBDatabaseConnection::createVersionChangeTransaction(uint64_t newVersion)
+{
+    LOG(IndexedDB, &quot;UniqueIDBDatabaseConnection::createVersionChangeTransaction&quot;);
+    ASSERT(!m_closePending);
+
+    IDBTransactionInfo info = IDBTransactionInfo::versionChange(m_connectionToClient, newVersion);
+
+    Ref&lt;UniqueIDBDatabaseTransaction&gt; transaction = UniqueIDBDatabaseTransaction::create(*this, info);
+    m_transactionMap.set(transaction-&gt;info().identifier(), &amp;transaction.get());
+
+    return WTF::move(transaction);
+}
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectionhfromrev190883trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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 UniqueIDBDatabaseConnection_h
+#define UniqueIDBDatabaseConnection_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;UniqueIDBDatabaseTransaction.h&quot;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/Ref.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebCore {
+namespace IDBServer {
+
+class IDBConnectionToClient;
+class UniqueIDBDatabase;
+class UniqueIDBDatabaseTransaction;
+
+class UniqueIDBDatabaseConnection : public RefCounted&lt;UniqueIDBDatabaseConnection&gt; {
+public:
+    static Ref&lt;UniqueIDBDatabaseConnection&gt; create(UniqueIDBDatabase&amp;, IDBConnectionToClient&amp;);
+
+    uint64_t identifier() const { return m_identifier; }
+    UniqueIDBDatabase&amp; database() { return m_database; }
+    IDBConnectionToClient&amp; connectionToClient() { return m_connectionToClient; }
+
+    bool closePending() const { return m_closePending; }
+
+    void fireVersionChangeEvent(uint64_t requestedVersion);
+    Ref&lt;UniqueIDBDatabaseTransaction&gt; createVersionChangeTransaction(uint64_t newVersion);
+
+private:
+    UniqueIDBDatabaseConnection(UniqueIDBDatabase&amp;, IDBConnectionToClient&amp;);
+
+    uint64_t m_identifier { 0 };
+    UniqueIDBDatabase&amp; m_database;
+    IDBConnectionToClient&amp; m_connectionToClient;
+
+    bool m_closePending { false };
+
+    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;UniqueIDBDatabaseTransaction&gt;&gt; m_transactionMap;
+};
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // UniqueIDBDatabaseConnection_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactioncppfromrev190883trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientDelegateh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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;UniqueIDBDatabaseTransaction.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+namespace IDBServer {
+
+Ref&lt;UniqueIDBDatabaseTransaction&gt; UniqueIDBDatabaseTransaction::create(UniqueIDBDatabaseConnection&amp; connection, IDBTransactionInfo&amp; info)
+{
+    return adoptRef(*new UniqueIDBDatabaseTransaction(connection, info));
+}
+
+UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction(UniqueIDBDatabaseConnection&amp; connection, IDBTransactionInfo&amp; info)
+    : m_databaseConnection(connection)
+    , m_transactionInfo(info)
+{
+}
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactionhfromrev190883trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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 UniqueIDBDatabaseTransaction_h
+#define UniqueIDBDatabaseTransaction_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBTransactionInfo.h&quot;
+#include &quot;UniqueIDBDatabaseConnection.h&quot;
+#include &lt;wtf/Ref.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebCore {
+namespace IDBServer {
+
+class UniqueIDBDatabaseConnection;
+
+class UniqueIDBDatabaseTransaction : public RefCounted&lt;UniqueIDBDatabaseTransaction&gt; {
+public:
+    static Ref&lt;UniqueIDBDatabaseTransaction&gt; create(UniqueIDBDatabaseConnection&amp;, IDBTransactionInfo&amp;);
+
+    UniqueIDBDatabaseConnection&amp; databaseConnection() { return m_databaseConnection.get(); }
+    const IDBTransactionInfo&amp; info() const { return m_transactionInfo; }
+
+private:
+    UniqueIDBDatabaseTransaction(UniqueIDBDatabaseConnection&amp;, IDBTransactionInfo&amp;);
+
+    Ref&lt;UniqueIDBDatabaseConnection&gt; m_databaseConnection;
+    IDBTransactionInfo m_transactionInfo;
+};
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // UniqueIDBDatabaseTransaction_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -30,6 +30,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+IDBDatabaseInfo::IDBDatabaseInfo()
+{
+}
+
</ins><span class="cx"> IDBDatabaseInfo::IDBDatabaseInfo(const String&amp; name, uint64_t version)
</span><span class="cx">     : m_name(name)
</span><span class="cx">     , m_version(version)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -38,10 +38,11 @@
</span><span class="cx"> 
</span><span class="cx">     IDBDatabaseInfo isolatedCopy() const;
</span><span class="cx"> 
</span><ins>+    const String&amp; name() const { return m_name; }
+    uint64_t version() const { return m_version; }
+
</ins><span class="cx"> private:
</span><del>-    IDBDatabaseInfo()
-    {
-    }
</del><ins>+    IDBDatabaseInfo();
</ins><span class="cx"> 
</span><span class="cx">     String m_name;
</span><span class="cx">     uint64_t m_version { 0 };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -34,7 +34,8 @@
</span><span class="cx"> 
</span><span class="cx"> enum class IDBExceptionCode {
</span><span class="cx">     None = 0,
</span><del>-    Unknown = 1,
</del><ins>+    Unknown,
+    VersionError,
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class IDBError {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -36,9 +36,15 @@
</span><span class="cx"> IDBRequestData::IDBRequestData(const IDBClient::IDBConnectionToServer&amp; connection, const IDBClient::IDBOpenDBRequest&amp; request)
</span><span class="cx">     : m_requestIdentifier(connection, request)
</span><span class="cx">     , m_databaseIdentifier(request.databaseIdentifier())
</span><ins>+    , m_requestedVersion(request.version())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+uint64_t IDBRequestData::requestedVersion() const
+{
+    return m_requestedVersion;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -45,9 +45,13 @@
</span><span class="cx">     IDBResourceIdentifier requestIdentifier() const { return m_requestIdentifier; }
</span><span class="cx">     const IDBDatabaseIdentifier&amp; databaseIdentifier() const { return m_databaseIdentifier; }
</span><span class="cx"> 
</span><ins>+    uint64_t requestedVersion() const;
+
</ins><span class="cx"> private:
</span><span class="cx">     IDBResourceIdentifier m_requestIdentifier;
</span><span class="cx">     IDBDatabaseIdentifier m_databaseIdentifier;
</span><ins>+
+    uint64_t m_requestedVersion;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -28,27 +28,36 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBConnectionToClient.h&quot;
</ins><span class="cx"> #include &quot;IDBConnectionToServer.h&quot;
</span><span class="cx"> #include &quot;IDBRequestImpl.h&quot;
</span><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-static uint64_t nextResourceNumber()
</del><ins>+static uint64_t nextClientResourceNumber()
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><ins>+    static uint64_t currentNumber = 1;
+    return currentNumber += 2;
+}
+
+static uint64_t nextServerResourceNumber()
+{
+    ASSERT(isMainThread());
</ins><span class="cx">     static uint64_t currentNumber = 0;
</span><del>-    return ++currentNumber;
</del><ins>+    return currentNumber += 2;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBResourceIdentifier::IDBResourceIdentifier()
-    : m_resourceNumber(nextResourceNumber())
</del><ins>+IDBResourceIdentifier::IDBResourceIdentifier(uint64_t connectionIdentifier, uint64_t resourceIdentifier)
+    : m_idbConnectionIdentifier(connectionIdentifier)
+    , m_resourceNumber(resourceIdentifier)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IDBResourceIdentifier::IDBResourceIdentifier(const IDBClient::IDBConnectionToServer&amp; connection)
</span><span class="cx">     : m_idbConnectionIdentifier(connection.identifier())
</span><del>-    , m_resourceNumber(nextResourceNumber())
</del><ins>+    , m_resourceNumber(nextClientResourceNumber())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -58,20 +67,20 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBResourceIdentifier::IDBResourceIdentifier(const IDBServer::IDBConnectionToClient&amp; connection)
+    : m_idbConnectionIdentifier(connection.identifier())
+    , m_resourceNumber(nextServerResourceNumber())
+{
+}
+
</ins><span class="cx"> IDBResourceIdentifier IDBResourceIdentifier::emptyValue()
</span><span class="cx"> {
</span><del>-    IDBResourceIdentifier result;
-    result.m_idbConnectionIdentifier = 0;
-    result.m_resourceNumber = 0;
-    return WTF::move(result);
</del><ins>+    return IDBResourceIdentifier(0, 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IDBResourceIdentifier IDBResourceIdentifier::deletedValue()
</span><span class="cx"> {
</span><del>-    IDBResourceIdentifier result;
-    result.m_idbConnectionIdentifier = std::numeric_limits&lt;uint64_t&gt;::max();
-    result.m_resourceNumber = std::numeric_limits&lt;uint64_t&gt;::max();
-    return WTF::move(result);
</del><ins>+    return IDBResourceIdentifier(std::numeric_limits&lt;uint64_t&gt;::max(), std::numeric_limits&lt;uint64_t&gt;::max());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool IDBResourceIdentifier::isHashTableDeletedValue() const
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -37,10 +37,15 @@
</span><span class="cx"> class IDBRequest;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+namespace IDBServer {
+class IDBConnectionToClient;
+}
+
</ins><span class="cx"> class IDBResourceIdentifier {
</span><span class="cx"> public:
</span><del>-    IDBResourceIdentifier(const IDBClient::IDBConnectionToServer&amp;);
</del><ins>+    explicit IDBResourceIdentifier(const IDBClient::IDBConnectionToServer&amp;);
</ins><span class="cx">     IDBResourceIdentifier(const IDBClient::IDBConnectionToServer&amp;, const IDBClient::IDBRequest&amp;);
</span><ins>+    explicit IDBResourceIdentifier(const IDBServer::IDBConnectionToClient&amp;);
</ins><span class="cx"> 
</span><span class="cx">     static IDBResourceIdentifier deletedValue();
</span><span class="cx">     bool isHashTableDeletedValue() const;
</span><span class="lines">@@ -66,9 +71,10 @@
</span><span class="cx">     uint64_t connectionIdentifier() const { return m_idbConnectionIdentifier; }
</span><span class="cx">     
</span><span class="cx"> private:
</span><del>-    IDBResourceIdentifier();
</del><ins>+    IDBResourceIdentifier() = delete;
+    IDBResourceIdentifier(uint64_t connectionIdentifier, uint64_t resourceIdentifier);
</ins><span class="cx">     uint64_t m_idbConnectionIdentifier { 0 };
</span><del>-    uint64_t m_resourceNumber;
</del><ins>+    uint64_t m_resourceNumber { 0 };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> struct IDBResourceIdentifierHash {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResultDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -28,14 +28,69 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;UniqueIDBDatabase.h&quot;
+#include &quot;UniqueIDBDatabaseConnection.h&quot;
+#include &quot;UniqueIDBDatabaseTransaction.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBResultData::IDBResultData(const IDBResourceIdentifier&amp; requestIdentifier, const IDBError&amp; error)
</del><ins>+IDBResultData::IDBResultData(const IDBResourceIdentifier&amp; requestIdentifier)
</ins><span class="cx">     : m_requestIdentifier(requestIdentifier)
</span><del>-    , m_error(error)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBResultData::IDBResultData(const IDBResultData&amp; other)
+    : m_type(other.m_type)
+    , m_requestIdentifier(other.m_requestIdentifier)
+    , m_error(other.m_error)
+    , m_databaseConnectionIdentifier(other.m_databaseConnectionIdentifier)
+{
+    if (other.m_databaseInfo)
+        m_databaseInfo = std::make_unique&lt;IDBDatabaseInfo&gt;(*other.m_databaseInfo);
+    if (other.m_transactionInfo)
+        m_transactionInfo = std::make_unique&lt;IDBTransactionInfo&gt;(*other.m_transactionInfo);
+}
+
+IDBResultData IDBResultData::error(const IDBResourceIdentifier&amp; requestIdentifier, const IDBError&amp; error)
+{
+    IDBResultData result(requestIdentifier);
+    result.m_type = IDBResultType::Error;
+    result.m_error = error;
+    return WTF::move(result);
+}
+
+IDBResultData IDBResultData::openDatabaseSuccess(const IDBResourceIdentifier&amp; requestIdentifier, IDBServer::UniqueIDBDatabaseConnection&amp; connection)
+{
+    IDBResultData result(requestIdentifier);
+    result.m_type = IDBResultType::OpenDatabaseSuccess;
+    result.m_databaseConnectionIdentifier = connection.identifier();
+    result.m_databaseInfo = std::make_unique&lt;IDBDatabaseInfo&gt;(connection.database().info());
+    return WTF::move(result);
+}
+
+
+IDBResultData IDBResultData::openDatabaseUpgradeNeeded(const IDBResourceIdentifier&amp; requestIdentifier, IDBServer::UniqueIDBDatabaseTransaction&amp; transaction)
+{
+    IDBResultData result(requestIdentifier);
+    result.m_type = IDBResultType::OpenDatabaseUpgradeNeeded;
+    result.m_databaseConnectionIdentifier = transaction.databaseConnection().identifier();
+    result.m_databaseInfo = std::make_unique&lt;IDBDatabaseInfo&gt;(transaction.databaseConnection().database().info());
+    result.m_transactionInfo = std::make_unique&lt;IDBTransactionInfo&gt;(transaction.info());
+    return WTF::move(result);
+}
+
+const IDBDatabaseInfo&amp; IDBResultData::databaseInfo() const
+{
+    RELEASE_ASSERT(m_databaseInfo);
+    return *m_databaseInfo;
+}
+
+const IDBTransactionInfo&amp; IDBResultData::transactionInfo() const
+{
+    RELEASE_ASSERT(m_transactionInfo);
+    return *m_transactionInfo;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResultDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -28,24 +28,52 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBDatabaseInfo.h&quot;
</ins><span class="cx"> #include &quot;IDBError.h&quot;
</span><span class="cx"> #include &quot;IDBResourceIdentifier.h&quot;
</span><ins>+#include &quot;IDBTransactionInfo.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class IDBResourceIdentifier;
</span><span class="cx"> 
</span><ins>+namespace IDBServer {
+class UniqueIDBDatabaseConnection;
+class UniqueIDBDatabaseTransaction;
+}
+
+enum class IDBResultType {
+    Error,
+    OpenDatabaseSuccess,
+    OpenDatabaseUpgradeNeeded,
+};
+
</ins><span class="cx"> class IDBResultData {
</span><span class="cx"> public:
</span><del>-    IDBResultData(const IDBResourceIdentifier&amp;, const IDBError&amp;);
</del><ins>+    static IDBResultData error(const IDBResourceIdentifier&amp;, const IDBError&amp;);
+    static IDBResultData openDatabaseSuccess(const IDBResourceIdentifier&amp;, IDBServer::UniqueIDBDatabaseConnection&amp;);
+    static IDBResultData openDatabaseUpgradeNeeded(const IDBResourceIdentifier&amp;, IDBServer::UniqueIDBDatabaseTransaction&amp;);
+    IDBResultData(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><ins>+    IDBResultType type() const { return m_type; }
</ins><span class="cx">     IDBResourceIdentifier requestIdentifier() const { return m_requestIdentifier; }
</span><del>-    
</del><ins>+
</ins><span class="cx">     const IDBError&amp; error() const { return m_error; }
</span><del>-    
</del><ins>+    uint64_t databaseConnectionIdentifier() const { return m_databaseConnectionIdentifier; }
+
+    const IDBDatabaseInfo&amp; databaseInfo() const;
+    const IDBTransactionInfo&amp; transactionInfo() const;
+
</ins><span class="cx"> private:
</span><ins>+    IDBResultData(const IDBResourceIdentifier&amp;);
+
+    IDBResultType m_type;
</ins><span class="cx">     IDBResourceIdentifier m_requestIdentifier;
</span><ins>+
</ins><span class="cx">     IDBError m_error;
</span><ins>+    uint64_t m_databaseConnectionIdentifier { 0 };
+    std::unique_ptr&lt;IDBDatabaseInfo&gt; m_databaseInfo;
+    std::unique_ptr&lt;IDBTransactionInfo&gt; m_transactionInfo;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBTransactionInfocppfromrev190883trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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;IDBTransactionInfo.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+IDBTransactionInfo::IDBTransactionInfo(const IDBResourceIdentifier&amp; identifier)
+    : m_identifier(identifier)
+{
+}
+
+IDBTransactionInfo IDBTransactionInfo::versionChange(const IDBServer::IDBConnectionToClient&amp; connection, uint64_t newVersion)
+{
+    IDBTransactionInfo result((IDBResourceIdentifier(connection)));
+    result.m_mode = IndexedDB::TransactionMode::VersionChange;
+    result.m_newVersion = newVersion;
+
+    return WTF::move(result);
+}
+
+IDBTransactionInfo IDBTransactionInfo::isolatedCopy() const
+{
+    IDBTransactionInfo result(m_identifier);
+    result.m_mode = m_mode;
+    result.m_newVersion = m_newVersion;
+
+    return WTF::move(result);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBTransactionInfohfromrev190883trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h (from rev 190883, trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h) (0 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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 IDBTransactionInfo_h
+#define IDBTransactionInfo_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBResourceIdentifier.h&quot;
+#include &quot;IndexedDB.h&quot;
+
+namespace WebCore {
+namespace IDBServer {
+class IDBConnectionToClient;
+}
+
+class IDBTransactionInfo {
+public:
+    static IDBTransactionInfo versionChange(const IDBServer::IDBConnectionToClient&amp;, uint64_t newVersion);
+
+    IDBTransactionInfo isolatedCopy() const;
+
+    IDBResourceIdentifier identifier() const { return m_identifier; }
+
+    IndexedDB::TransactionMode mode() const { return m_mode; }
+    uint64_t newVersion() const { return m_newVersion; }
+
+private:
+    IDBTransactionInfo(const IDBResourceIdentifier&amp;);
+
+    IDBResourceIdentifier m_identifier;
+
+    IndexedDB::TransactionMode m_mode { IndexedDB::TransactionMode::ReadOnly };
+    uint64_t m_newVersion { 0 };
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBTransactionInfo_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -102,6 +102,15 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InProcessIDBServer::fireVersionChangeEvent(IDBServer::UniqueIDBDatabaseConnection&amp; connection, uint64_t requestedVersion)
+{
+    RefPtr&lt;InProcessIDBServer&gt; self(this);
+    uint64_t databaseConnectionIdentifier = connection.identifier();
+    RunLoop::current().dispatch([this, self, databaseConnectionIdentifier, requestedVersion] {
+        m_connectionToServer-&gt;fireVersionChangeEvent(databaseConnectionIdentifier, requestedVersion);
+    });
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -61,6 +61,7 @@
</span><span class="cx">     virtual uint64_t identifier() const override;
</span><span class="cx">     virtual void didDeleteDatabase(const IDBResultData&amp;) override final;
</span><span class="cx">     virtual void didOpenDatabase(const IDBResultData&amp;) override final;
</span><ins>+    virtual void fireVersionChangeEvent(IDBServer::UniqueIDBDatabaseConnection&amp;, uint64_t requestedVersion) override final;
</ins><span class="cx"> 
</span><span class="cx">     virtual void ref() override { RefCounted&lt;InProcessIDBServer&gt;::ref(); }
</span><span class="cx">     virtual void deref() override { RefCounted&lt;InProcessIDBServer&gt;::deref(); }
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -2026,7 +2026,6 @@
</span><span class="cx">                 516C62201950D48700337E75 /* GamepadEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516C621D1950D48700337E75 /* GamepadEvent.cpp */; };
</span><span class="cx">                 516C62211950D48700337E75 /* GamepadEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 516C621E1950D48700337E75 /* GamepadEvent.h */; };
</span><span class="cx">                 516C62251950E2B900337E75 /* JSGamepadEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516C62231950E2B900337E75 /* JSGamepadEvent.cpp */; };
</span><del>-                516D7D6F1BB5F0BD00AF7C77 /* IDBConnectionToServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5185FCBC1BB5CB770012898F /* IDBConnectionToServer.cpp */; };
</del><span class="cx">                 516D7D701BB5F0BD00AF7C77 /* IDBConnectionToServerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5185FCBD1BB5CB770012898F /* IDBConnectionToServerDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 516D7D711BB5F0BD00AF7C77 /* IDBConnectionToClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516D7D6D1BB5F06500AF7C77 /* IDBConnectionToClient.cpp */; };
</span><span class="cx">                 516D7D721BB5F0BD00AF7C77 /* IDBConnectionToClientDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 516D7D6E1BB5F06500AF7C77 /* IDBConnectionToClientDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2044,7 +2043,6 @@
</span><span class="cx">                 517A63C51B74318F00E7DCDC /* KeyedDecoderCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A63C01B74317E00E7DCDC /* KeyedDecoderCF.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 517A63C61B74319200E7DCDC /* KeyedEncoderCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A63C21B74317E00E7DCDC /* KeyedEncoderCF.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 517FBA1E151AB17C00B57959 /* DOMWindowExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517FBA17151AA71B00B57959 /* DOMWindowExtension.cpp */; };
</span><del>-                5185FC5B1BB4BE4C0012898F /* IDBConnectionToServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58FD1BB07A9600C19282 /* IDBConnectionToServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 5185FC741BB4C4E80012898F /* DOMWindowIndexedDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7196C181106DF0016DC51 /* DOMWindowIndexedDatabase.cpp */; };
</span><span class="cx">                 5185FC751BB4C4E80012898F /* DOMWindowIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7196D181106DF0016DC51 /* DOMWindowIndexedDatabase.h */; };
</span><span class="cx">                 5185FC771BB4C4E80012898F /* IDBAny.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7196F181106DF0016DC51 /* IDBAny.cpp */; };
</span><span class="lines">@@ -2054,7 +2052,7 @@
</span><span class="cx">                 5185FC7D1BB4C4E80012898F /* IDBCursorWithValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B421B9F889B00F789CE /* IDBCursorWithValue.cpp */; };
</span><span class="cx">                 5185FC7E1BB4C4E80012898F /* IDBCursorWithValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B431B9F889B00F789CE /* IDBCursorWithValue.h */; };
</span><span class="cx">                 5185FC801BB4C4E80012898F /* IDBDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B441B9F889B00F789CE /* IDBDatabase.cpp */; };
</span><del>-                5185FC811BB4C4E80012898F /* IDBDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B451B9F889B00F789CE /* IDBDatabase.h */; };
</del><ins>+                5185FC811BB4C4E80012898F /* IDBDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B451B9F889B00F789CE /* IDBDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 5185FC831BB4C4E80012898F /* IDBDatabaseError.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71983181106DF0016DC51 /* IDBDatabaseError.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 5185FC841BB4C4E80012898F /* IDBDatabaseException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71984181106DF0016DC51 /* IDBDatabaseException.cpp */; };
</span><span class="cx">                 5185FC851BB4C4E80012898F /* IDBDatabaseException.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71985181106DF0016DC51 /* IDBDatabaseException.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2081,7 +2079,7 @@
</span><span class="cx">                 5185FC9D1BB4C4E80012898F /* IDBKeyRangeData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5123AF161890A4CA0031CDC9 /* IDBKeyRangeData.cpp */; };
</span><span class="cx">                 5185FC9E1BB4C4E80012898F /* IDBKeyRangeData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5123AF171890A4CA0031CDC9 /* IDBKeyRangeData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 5185FC9F1BB4C4E80012898F /* IDBObjectStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B4A1B9F889B00F789CE /* IDBObjectStore.cpp */; };
</span><del>-                5185FCA01BB4C4E80012898F /* IDBObjectStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B4B1B9F889B00F789CE /* IDBObjectStore.h */; };
</del><ins>+                5185FCA01BB4C4E80012898F /* IDBObjectStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B4B1B9F889B00F789CE /* IDBObjectStore.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 5185FCA21BB4C4E80012898F /* IDBObjectStoreMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 51ABB5B7186D0ED1008391A1 /* IDBObjectStoreMetadata.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 5185FCA31BB4C4E80012898F /* IDBOpenDBRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B4C1B9F889B00F789CE /* IDBOpenDBRequest.cpp */; };
</span><span class="cx">                 5185FCA41BB4C4E80012898F /* IDBOpenDBRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B4D1B9F889B00F789CE /* IDBOpenDBRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2113,6 +2111,22 @@
</span><span class="cx">                 518F5002194CAC3A0081BAAE /* JSGamepad.h in Headers */ = {isa = PBXBuildFile; fileRef = 518F4FFE194CAC3A0081BAAE /* JSGamepad.h */; };
</span><span class="cx">                 518F5003194CAC3A0081BAAE /* JSGamepadButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 518F4FFF194CAC3A0081BAAE /* JSGamepadButton.cpp */; };
</span><span class="cx">                 518F5004194CAC3A0081BAAE /* JSGamepadButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 518F5000194CAC3A0081BAAE /* JSGamepadButton.h */; };
</span><ins>+                5198F7A41BBDB79300E2CC5F /* UniqueIDBDatabaseConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7A21BBDAA2900E2CC5F /* UniqueIDBDatabaseConnection.cpp */; };
+                5198F7A51BBDB79300E2CC5F /* UniqueIDBDatabaseConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7A31BBDAA2900E2CC5F /* UniqueIDBDatabaseConnection.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                5198F7A81BBDD38500E2CC5F /* UniqueIDBDatabaseTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7A61BBDD38100E2CC5F /* UniqueIDBDatabaseTransaction.cpp */; };
+                5198F7A91BBDD38500E2CC5F /* UniqueIDBDatabaseTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7A71BBDD38100E2CC5F /* UniqueIDBDatabaseTransaction.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                5198F7AC1BBDD3EB00E2CC5F /* IDBTransactionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7AA1BBDD3E300E2CC5F /* IDBTransactionInfo.cpp */; };
+                5198F7AD1BBDD3EB00E2CC5F /* IDBTransactionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7AB1BBDD3E300E2CC5F /* IDBTransactionInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                5198F7B01BBDF5C800E2CC5F /* IDBDatabaseImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7AE1BBDF59200E2CC5F /* IDBDatabaseImpl.cpp */; };
+                5198F7B11BBDF5C800E2CC5F /* IDBDatabaseImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7AF1BBDF59200E2CC5F /* IDBDatabaseImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                5198F7B41BBE003C00E2CC5F /* IDBTransactionImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7B21BBE001D00E2CC5F /* IDBTransactionImpl.cpp */; };
+                5198F7B51BBE003C00E2CC5F /* IDBTransactionImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7B31BBE001D00E2CC5F /* IDBTransactionImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                5198F7B81BC3145100E2CC5F /* IDBVersionChangeEventImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7B61BC3141700E2CC5F /* IDBVersionChangeEventImpl.cpp */; };
+                5198F7B91BC3145100E2CC5F /* IDBVersionChangeEventImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7B71BC3141700E2CC5F /* IDBVersionChangeEventImpl.h */; };
+                5198F7BE1BC338AF00E2CC5F /* IDBAnyImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7BC1BC338A900E2CC5F /* IDBAnyImpl.cpp */; };
+                5198F7BF1BC338AF00E2CC5F /* IDBAnyImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7BD1BC338A900E2CC5F /* IDBAnyImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                5198F7C01BC4856700E2CC5F /* IDBConnectionToServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5185FCBC1BB5CB770012898F /* IDBConnectionToServer.cpp */; };
+                5198F7C11BC4856700E2CC5F /* IDBConnectionToServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58FD1BB07A9600C19282 /* IDBConnectionToServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 51A052331058774F00CC9E95 /* CredentialStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A052311058774F00CC9E95 /* CredentialStorage.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51A052341058774F00CC9E95 /* CredentialStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A052321058774F00CC9E95 /* CredentialStorage.cpp */; };
</span><span class="cx">                 51A052561058874000CC9E95 /* ProtectionSpaceHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A052551058874000CC9E95 /* ProtectionSpaceHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -9436,6 +9450,20 @@
</span><span class="cx">                 518F4FFE194CAC3A0081BAAE /* JSGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGamepad.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 518F4FFF194CAC3A0081BAAE /* JSGamepadButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGamepadButton.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 518F5000194CAC3A0081BAAE /* JSGamepadButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGamepadButton.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                5198F7A21BBDAA2900E2CC5F /* UniqueIDBDatabaseConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UniqueIDBDatabaseConnection.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7A31BBDAA2900E2CC5F /* UniqueIDBDatabaseConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueIDBDatabaseConnection.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7A61BBDD38100E2CC5F /* UniqueIDBDatabaseTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UniqueIDBDatabaseTransaction.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7A71BBDD38100E2CC5F /* UniqueIDBDatabaseTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueIDBDatabaseTransaction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7AA1BBDD3E300E2CC5F /* IDBTransactionInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransactionInfo.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7AB1BBDD3E300E2CC5F /* IDBTransactionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7AE1BBDF59200E2CC5F /* IDBDatabaseImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7AF1BBDF59200E2CC5F /* IDBDatabaseImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7B21BBE001D00E2CC5F /* IDBTransactionImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransactionImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7B31BBE001D00E2CC5F /* IDBTransactionImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7B61BC3141700E2CC5F /* IDBVersionChangeEventImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBVersionChangeEventImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7B71BC3141700E2CC5F /* IDBVersionChangeEventImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBVersionChangeEventImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7BC1BC338A900E2CC5F /* IDBAnyImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBAnyImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5198F7BD1BC338A900E2CC5F /* IDBAnyImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBAnyImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 519FE0A10DAD446E00A08F21 /* HTMLAttributeNames.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLAttributeNames.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 519FE0A20DAD446E00A08F21 /* HTMLTagNames.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTagNames.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51A052311058774F00CC9E95 /* CredentialStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CredentialStorage.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16657,15 +16685,23 @@
</span><span class="cx">                 510310421BA8C64C003329C0 /* client */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                5198F7BC1BC338A900E2CC5F /* IDBAnyImpl.cpp */,
+                                5198F7BD1BC338A900E2CC5F /* IDBAnyImpl.h */,
</ins><span class="cx">                                 5185FCBC1BB5CB770012898F /* IDBConnectionToServer.cpp */,
</span><span class="cx">                                 510A58FD1BB07A9600C19282 /* IDBConnectionToServer.h */,
</span><span class="cx">                                 5185FCBD1BB5CB770012898F /* IDBConnectionToServerDelegate.h */,
</span><ins>+                                5198F7AE1BBDF59200E2CC5F /* IDBDatabaseImpl.cpp */,
+                                5198F7AF1BBDF59200E2CC5F /* IDBDatabaseImpl.h */,
</ins><span class="cx">                                 5103104A1BA8C6A6003329C0 /* IDBFactoryImpl.cpp */,
</span><span class="cx">                                 5103104B1BA8C6A6003329C0 /* IDBFactoryImpl.h */,
</span><span class="cx">                                 510310561BA8DB30003329C0 /* IDBOpenDBRequestImpl.cpp */,
</span><span class="cx">                                 510310571BA8DB30003329C0 /* IDBOpenDBRequestImpl.h */,
</span><span class="cx">                                 510310581BA8DB30003329C0 /* IDBRequestImpl.cpp */,
</span><span class="cx">                                 510310591BA8DB30003329C0 /* IDBRequestImpl.h */,
</span><ins>+                                5198F7B21BBE001D00E2CC5F /* IDBTransactionImpl.cpp */,
+                                5198F7B31BBE001D00E2CC5F /* IDBTransactionImpl.h */,
+                                5198F7B61BC3141700E2CC5F /* IDBVersionChangeEventImpl.cpp */,
+                                5198F7B71BC3141700E2CC5F /* IDBVersionChangeEventImpl.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = client;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -16683,6 +16719,8 @@
</span><span class="cx">                                 5145B1081BC4890B00E86219 /* IDBResourceIdentifier.h */,
</span><span class="cx">                                 51D7236A1BB60BFE00478CA3 /* IDBResultData.cpp */,
</span><span class="cx">                                 51D7236B1BB60BFE00478CA3 /* IDBResultData.h */,
</span><ins>+                                5198F7AA1BBDD3E300E2CC5F /* IDBTransactionInfo.cpp */,
+                                5198F7AB1BBDD3E300E2CC5F /* IDBTransactionInfo.h */,
</ins><span class="cx">                                 510A58E21BAA40AE00C19282 /* InProcessIDBServer.cpp */,
</span><span class="cx">                                 510A58E31BAA40AE00C19282 /* InProcessIDBServer.h */,
</span><span class="cx">                         );
</span><span class="lines">@@ -16704,6 +16742,10 @@
</span><span class="cx">                                 51BA4AC91BBC5B9E00DF3D6D /* MemoryIDBBackingStore.h */,
</span><span class="cx">                                 518864DE1BBAF30F00E540C9 /* UniqueIDBDatabase.cpp */,
</span><span class="cx">                                 518864DF1BBAF30F00E540C9 /* UniqueIDBDatabase.h */,
</span><ins>+                                5198F7A21BBDAA2900E2CC5F /* UniqueIDBDatabaseConnection.cpp */,
+                                5198F7A31BBDAA2900E2CC5F /* UniqueIDBDatabaseConnection.h */,
+                                5198F7A61BBDD38100E2CC5F /* UniqueIDBDatabaseTransaction.cpp */,
+                                5198F7A71BBDD38100E2CC5F /* UniqueIDBDatabaseTransaction.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = server;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -25174,6 +25216,7 @@
</span><span class="cx">                                 3AC648B2129E146500C3EB25 /* EditingBoundary.h in Headers */,
</span><span class="cx">                                 9BAB6C6C12550631001626D4 /* EditingStyle.h in Headers */,
</span><span class="cx">                                 4B3043CD0AE0373B00A82647 /* Editor.h in Headers */,
</span><ins>+                                5198F7B11BBDF5C800E2CC5F /* IDBDatabaseImpl.h in Headers */,
</ins><span class="cx">                                 1AF326790D78B9440068F0C4 /* EditorClient.h in Headers */,
</span><span class="cx">                                 4BAE95B10B2FA9CE00AED8A0 /* EditorDeleteAction.h in Headers */,
</span><span class="cx">                                 93FDAFCA0B11307400E2746F /* EditorInsertAction.h in Headers */,
</span><span class="lines">@@ -26138,6 +26181,7 @@
</span><span class="cx">                                 B2FA3DEE0AB75A6F000E5AC4 /* JSSVGRectElement.h in Headers */,
</span><span class="cx">                                 B2FA3DF10AB75A6F000E5AC4 /* JSSVGRenderingIntent.h in Headers */,
</span><span class="cx">                                 B2FA3DF30AB75A6F000E5AC4 /* JSSVGScriptElement.h in Headers */,
</span><ins>+                                5198F7AD1BBDD3EB00E2CC5F /* IDBTransactionInfo.h in Headers */,
</ins><span class="cx">                                 B2FA3DF50AB75A6F000E5AC4 /* JSSVGSetElement.h in Headers */,
</span><span class="cx">                                 B2FA3DF70AB75A6F000E5AC4 /* JSSVGStopElement.h in Headers */,
</span><span class="cx">                                 B2FA3DF90AB75A6F000E5AC4 /* JSSVGStringList.h in Headers */,
</span><span class="lines">@@ -26400,6 +26444,7 @@
</span><span class="cx">                                 07C59B6917F784BA000FBCBB /* MediaSourceStates.h in Headers */,
</span><span class="cx">                                 078E091517D14D1C00420AA1 /* MediaStream.h in Headers */,
</span><span class="cx">                                 078E094C17D1709600420AA1 /* MediaStreamAudioDestinationNode.h in Headers */,
</span><ins>+                                5198F7C11BC4856700E2CC5F /* IDBConnectionToServer.h in Headers */,
</ins><span class="cx">                                 0783228518013ED800999E0C /* MediaStreamAudioSource.h in Headers */,
</span><span class="cx">                                 FD671A78159BB07000197559 /* MediaStreamAudioSourceNode.h in Headers */,
</span><span class="cx">                                 0705850B17FA4827005F2BCB /* MediaStreamCapabilities.h in Headers */,
</span><span class="lines">@@ -26941,7 +26986,6 @@
</span><span class="cx">                                 078E092A17D14D1C00420AA1 /* RTCStatsReport.h in Headers */,
</span><span class="cx">                                 078E094517D16E1C00420AA1 /* RTCStatsRequest.h in Headers */,
</span><span class="cx">                                 078E092B17D14D1C00420AA1 /* RTCStatsRequestImpl.h in Headers */,
</span><del>-                                5185FC5B1BB4BE4C0012898F /* IDBConnectionToServer.h in Headers */,
</del><span class="cx">                                 078E092C17D14D1C00420AA1 /* RTCStatsResponse.h in Headers */,
</span><span class="cx">                                 078E094617D16E1C00420AA1 /* RTCStatsResponseBase.h in Headers */,
</span><span class="cx">                                 078E094717D16E1C00420AA1 /* RTCVoidRequest.h in Headers */,
</span><span class="lines">@@ -26979,6 +27023,7 @@
</span><span class="cx">                                 41C760B10EDE03D300C1655F /* ScriptState.h in Headers */,
</span><span class="cx">                                 228C284510D82500009D0D0E /* ScriptWrappable.h in Headers */,
</span><span class="cx">                                 1400D7A817136EA70077CE05 /* ScriptWrappableInlines.h in Headers */,
</span><ins>+                                5198F7B91BC3145100E2CC5F /* IDBVersionChangeEventImpl.h in Headers */,
</ins><span class="cx">                                 BC8AE34F12EA096A00EB3AE6 /* ScrollableArea.h in Headers */,
</span><span class="cx">                                 CA3BF67E10D99BAE00E6CE53 /* ScrollAnimator.h in Headers */,
</span><span class="cx">                                 0F1774801378B772009DA76A /* ScrollAnimatorIOS.h in Headers */,
</span><span class="lines">@@ -27035,6 +27080,7 @@
</span><span class="cx">                                 CDCFABBD18C0AF78006F8450 /* SelectionSubtreeRoot.h in Headers */,
</span><span class="cx">                                 E44B4BB4141650D7002B1D8B /* SelectorChecker.h in Headers */,
</span><span class="cx">                                 432D3FE818A8658400D7DC03 /* SelectorCheckerTestFunctions.h in Headers */,
</span><ins>+                                5198F7BF1BC338AF00E2CC5F /* IDBAnyImpl.h in Headers */,
</ins><span class="cx">                                 26B999971804D54200D01121 /* SelectorCompiler.h in Headers */,
</span><span class="cx">                                 415071581685067300C3C7B3 /* SelectorFilter.h in Headers */,
</span><span class="cx">                                 43107BE218CC19DE00CC18E8 /* SelectorPseudoTypeMap.h in Headers */,
</span><span class="lines">@@ -27059,6 +27105,7 @@
</span><span class="cx">                                 FD45A952175D3F3E00C21EC8 /* ShapeOutsideInfo.h in Headers */,
</span><span class="cx">                                 FD1AF1501656F15100C6D4F7 /* ShapeValue.h in Headers */,
</span><span class="cx">                                 1A4A954E0B4EDCCB002D8C3C /* SharedBuffer.h in Headers */,
</span><ins>+                                5198F7A51BBDB79300E2CC5F /* UniqueIDBDatabaseConnection.h in Headers */,
</ins><span class="cx">                                 97B1F02F13B025D200F5103F /* SharedBufferChunkReader.h in Headers */,
</span><span class="cx">                                 93309EA3099EB78C0056E581 /* SharedTimer.h in Headers */,
</span><span class="cx">                                 E48944A3180B57D800F165D8 /* SimpleLineLayout.h in Headers */,
</span><span class="lines">@@ -27421,6 +27468,7 @@
</span><span class="cx">                                 081093DC1255F0E700ED9D29 /* SVGTextLayoutAttributesBuilder.h in Headers */,
</span><span class="cx">                                 5185FC8B1BB4C4E80012898F /* IDBEventDispatcher.h in Headers */,
</span><span class="cx">                                 081668DA125603D5006F25DE /* SVGTextLayoutEngine.h in Headers */,
</span><ins>+                                5198F7B51BBE003C00E2CC5F /* IDBTransactionImpl.h in Headers */,
</ins><span class="cx">                                 080E49261255F3BD00EFCA27 /* SVGTextLayoutEngineBaseline.h in Headers */,
</span><span class="cx">                                 080E49281255F3BD00EFCA27 /* SVGTextLayoutEngineSpacing.h in Headers */,
</span><span class="cx">                                 08F0BFC61255C53C00075185 /* SVGTextMetrics.h in Headers */,
</span><span class="lines">@@ -27817,6 +27865,7 @@
</span><span class="cx">                                 00B9318813BA8DBA0035A948 /* XMLDocumentParser.h in Headers */,
</span><span class="cx">                                 00B9318C13BA8DCC0035A948 /* XMLDocumentParserScope.h in Headers */,
</span><span class="cx">                                 59C28046138DC2410079B7E2 /* XMLErrors.h in Headers */,
</span><ins>+                                5198F7A91BBDD38500E2CC5F /* UniqueIDBDatabaseTransaction.h in Headers */,
</ins><span class="cx">                                 BC772C470C4EB2C60083285F /* XMLHttpRequest.h in Headers */,
</span><span class="cx">                                 BC60D9C90D2A29E500B9918F /* XMLHttpRequestException.h in Headers */,
</span><span class="cx">                                 F9F0ED7A0DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h in Headers */,
</span><span class="lines">@@ -28619,6 +28668,7 @@
</span><span class="cx">                                 85032DE80AA8C9BE007D3B7D /* DOMCSSStyleRule.mm in Sources */,
</span><span class="cx">                                 858C39290AA8FF9D00B187A4 /* DOMCSSStyleSheet.mm in Sources */,
</span><span class="cx">                                 FCD8832B16A49F8200962227 /* DOMCSSSupportsRule.mm in Sources */,
</span><ins>+                                5198F7A81BBDD38500E2CC5F /* UniqueIDBDatabaseTransaction.cpp in Sources */,
</ins><span class="cx">                                 85032DEA0AA8C9BE007D3B7D /* DOMCSSUnknownRule.mm in Sources */,
</span><span class="cx">                                 858C381D0AA8E29600B187A4 /* DOMCSSValue.mm in Sources */,
</span><span class="cx">                                 858C383D0AA8ED8200B187A4 /* DOMCSSValueList.mm in Sources */,
</span><span class="lines">@@ -28983,6 +29033,7 @@
</span><span class="cx">                                 FD31609A12B026F700C1A359 /* HRTFDatabaseLoader.cpp in Sources */,
</span><span class="cx">                                 FD31609C12B026F700C1A359 /* HRTFElevation.cpp in Sources */,
</span><span class="cx">                                 FD31609E12B026F700C1A359 /* HRTFKernel.cpp in Sources */,
</span><ins>+                                5198F7BE1BC338AF00E2CC5F /* IDBAnyImpl.cpp in Sources */,
</ins><span class="cx">                                 FD3160A012B026F700C1A359 /* HRTFPanner.cpp in Sources */,
</span><span class="cx">                                 BC97E23B109144950010D361 /* HTMLAllCollection.cpp in Sources */,
</span><span class="cx">                                 A8CFF7A40A156978000A4234 /* HTMLAnchorElement.cpp in Sources */,
</span><span class="lines">@@ -29188,6 +29239,7 @@
</span><span class="cx">                                 A5840E1C187B74D500843B10 /* InspectorInstrumentationCookie.cpp in Sources */,
</span><span class="cx">                                 71B1E1261640491A00B1880A /* InspectorLayerTreeAgent.cpp in Sources */,
</span><span class="cx">                                 504AACCD1834455900E3D9BC /* InspectorNodeFinder.cpp in Sources */,
</span><ins>+                                5198F7B41BBE003C00E2CC5F /* IDBTransactionImpl.cpp in Sources */,
</ins><span class="cx">                                 7C522D4B15B477E8009B7C95 /* InspectorOverlay.cpp in Sources */,
</span><span class="cx">                                 4F6FDD641341DEDD001F8EE3 /* InspectorPageAgent.cpp in Sources */,
</span><span class="cx">                                 99CC0B6618BE9F15006CEBCC /* InspectorReplayAgent.cpp in Sources */,
</span><span class="lines">@@ -29357,6 +29409,7 @@
</span><span class="cx">                                 FD67773B195CB1E60072E0D3 /* JSDOMWindowCSS.cpp in Sources */,
</span><span class="cx">                                 BCD9C2620C17AA67005C90A2 /* JSDOMWindowCustom.cpp in Sources */,
</span><span class="cx">                                 BCBFB53C0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp in Sources */,
</span><ins>+                                5198F7B81BC3145100E2CC5F /* IDBVersionChangeEventImpl.cpp in Sources */,
</ins><span class="cx">                                 FD7868B9136B999200D403DF /* JSDynamicsCompressorNode.cpp in Sources */,
</span><span class="cx">                                 65DF31F909D1CC60000BE325 /* JSElement.cpp in Sources */,
</span><span class="cx">                                 BC2ED5550C6B9BD300920BFF /* JSElementCustom.cpp in Sources */,
</span><span class="lines">@@ -29399,6 +29452,7 @@
</span><span class="cx">                                 BC97E42C10915B060010D361 /* JSHTMLAllCollectionCustom.cpp in Sources */,
</span><span class="cx">                                 1A4A2DEF0A1B852A00C807F8 /* JSHTMLAnchorElement.cpp in Sources */,
</span><span class="cx">                                 1A4A2DF10A1B852A00C807F8 /* JSHTMLAppletElement.cpp in Sources */,
</span><ins>+                                5198F7AC1BBDD3EB00E2CC5F /* IDBTransactionInfo.cpp in Sources */,
</ins><span class="cx">                                 BC4EDEF40C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp in Sources */,
</span><span class="cx">                                 1AE2AA1E0A1CDAB400B42B25 /* JSHTMLAreaElement.cpp in Sources */,
</span><span class="cx">                                 7C9DBFED1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp in Sources */,
</span><span class="lines">@@ -29552,6 +29606,7 @@
</span><span class="cx">                                 E107400D0E77BDC00033AF24 /* JSMessageChannel.cpp in Sources */,
</span><span class="cx">                                 E1A5F99B0E7EAA2500AF85EA /* JSMessageChannelCustom.cpp in Sources */,
</span><span class="cx">                                 75793EC80D0CE72D007FC0AC /* JSMessageEvent.cpp in Sources */,
</span><ins>+                                5198F7B01BBDF5C800E2CC5F /* IDBDatabaseImpl.cpp in Sources */,
</ins><span class="cx">                                 410B7E721045FAB000D8224F /* JSMessageEventCustom.cpp in Sources */,
</span><span class="cx">                                 E1ADEDDB0E76BD93004A1A5E /* JSMessagePort.cpp in Sources */,
</span><span class="cx">                                 E1ADED470E76B8DD004A1A5E /* JSMessagePortCustom.cpp in Sources */,
</span><span class="lines">@@ -29826,7 +29881,6 @@
</span><span class="cx">                                 07B5A2DB1464320A00A81ECE /* JSTextTrackList.cpp in Sources */,
</span><span class="cx">                                 07B5A30D14687D7100A81ECE /* JSTextTrackListCustom.cpp in Sources */,
</span><span class="cx">                                 E446141A0CD6826900FADA75 /* JSTimeRanges.cpp in Sources */,
</span><del>-                                516D7D6F1BB5F0BD00AF7C77 /* IDBConnectionToServer.cpp in Sources */,
</del><span class="cx">                                 0FDA7C16188322EB00C954B5 /* JSTouch.cpp in Sources */,
</span><span class="cx">                                 0FDA7C18188322EB00C954B5 /* JSTouchEvent.cpp in Sources */,
</span><span class="cx">                                 0FDA7C1A188322EB00C954B5 /* JSTouchList.cpp in Sources */,
</span><span class="lines">@@ -30709,6 +30763,7 @@
</span><span class="cx">                                 B222799B0D00BF220071B782 /* SVGCircleElement.cpp in Sources */,
</span><span class="cx">                                 B222799E0D00BF220071B782 /* SVGClipPathElement.cpp in Sources */,
</span><span class="cx">                                 B22279A10D00BF220071B782 /* SVGColor.cpp in Sources */,
</span><ins>+                                5198F7A41BBDB79300E2CC5F /* UniqueIDBDatabaseConnection.cpp in Sources */,
</ins><span class="cx">                                 B22279A40D00BF220071B782 /* SVGComponentTransferFunctionElement.cpp in Sources */,
</span><span class="cx">                                 B2227B050D00BFF10071B782 /* SVGCSSComputedStyleDeclaration.cpp in Sources */,
</span><span class="cx">                                 B2227B060D00BFF10071B782 /* SVGCSSParser.cpp in Sources */,
</span><span class="lines">@@ -30843,6 +30898,7 @@
</span><span class="cx">                                 B2227AF20D00BF220071B782 /* SVGViewSpec.cpp in Sources */,
</span><span class="cx">                                 8485228A1190173C006EDC7F /* SVGVKernElement.cpp in Sources */,
</span><span class="cx">                                 B2227AF50D00BF220071B782 /* SVGZoomAndPan.cpp in Sources */,
</span><ins>+                                5198F7C01BC4856700E2CC5F /* IDBConnectionToServer.cpp in Sources */,
</ins><span class="cx">                                 B2E4EC970D00C22B00432643 /* SVGZoomEvent.cpp in Sources */,
</span><span class="cx">                                 E180811216FCF42F00B80D07 /* SynchronousLoaderClient.cpp in Sources */,
</span><span class="cx">                                 E180811616FCF9CB00B80D07 /* SynchronousLoaderClient.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformCrossThreadCopiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/CrossThreadCopier.cpp (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/CrossThreadCopier.cpp        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/platform/CrossThreadCopier.cpp        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> #include &quot;IDBGetResult.h&quot;
</span><span class="cx"> #include &quot;IDBKeyData.h&quot;
</span><span class="cx"> #include &quot;IDBKeyRangeData.h&quot;
</span><ins>+#include &quot;IDBTransactionInfo.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -138,8 +139,14 @@
</span><span class="cx"> {
</span><span class="cx">     return identifier.isolatedCopy();
</span><span class="cx"> }
</span><del>-#endif
</del><span class="cx"> 
</span><ins>+CrossThreadCopierBase&lt;false, false, IDBTransactionInfo&gt;::Type CrossThreadCopierBase&lt;false, false, IDBTransactionInfo&gt;::copy(const IDBTransactionInfo&amp; info)
+{
+    return info.isolatedCopy();
+}
+
+#endif // ENABLE(INDEXED_DATABASE)
+
</ins><span class="cx"> // Test CrossThreadCopier using COMPILE_ASSERT.
</span><span class="cx"> 
</span><span class="cx"> // Verify that ThreadSafeRefCounted objects get handled correctly.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformCrossThreadCopierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/CrossThreadCopier.h (190883 => 190884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/CrossThreadCopier.h        2015-10-12 19:51:11 UTC (rev 190883)
+++ trunk/Source/WebCore/platform/CrossThreadCopier.h        2015-10-12 20:24:32 UTC (rev 190884)
</span><span class="lines">@@ -203,6 +203,12 @@
</span><span class="cx">         static Type copy(const IDBDatabaseIdentifier&amp;);
</span><span class="cx">     };
</span><span class="cx"> 
</span><ins>+    class IDBTransactionInfo;
+    template&lt;&gt; struct WEBCORE_EXPORT CrossThreadCopierBase&lt;false, false, IDBTransactionInfo&gt; {
+        typedef IDBTransactionInfo Type;
+        static Type copy(const IDBTransactionInfo&amp;);
+    };
+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     template&lt;typename T&gt;
</span></span></pre>
</div>
</div>

</body>
</html>