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

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

<h3>Log Message</h3>
<pre>Modern IDB: Implement server-&gt;client operations in WK2.
https://bugs.webkit.org/show_bug.cgi?id=154411

Reviewed by Alex Christensen.

No change in behavior yet; Just laying the groundwork.
Source/WebCore:

* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::encode):
(WebCore::IDBTransactionInfo::decode):

Source/WebKit2:

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::didDeleteDatabase):
(WebKit::WebIDBConnectionToServer::didOpenDatabase):
(WebKit::WebIDBConnectionToServer::didAbortTransaction):
(WebKit::WebIDBConnectionToServer::didCommitTransaction):
(WebKit::WebIDBConnectionToServer::didCreateObjectStore):
(WebKit::WebIDBConnectionToServer::didDeleteObjectStore):
(WebKit::WebIDBConnectionToServer::didClearObjectStore):
(WebKit::WebIDBConnectionToServer::didCreateIndex):
(WebKit::WebIDBConnectionToServer::didDeleteIndex):
(WebKit::WebIDBConnectionToServer::didPutOrAdd):
(WebKit::WebIDBConnectionToServer::didGetRecord):
(WebKit::WebIDBConnectionToServer::didGetCount):
(WebKit::WebIDBConnectionToServer::didDeleteRecord):
(WebKit::WebIDBConnectionToServer::didOpenCursor):
(WebKit::WebIDBConnectionToServer::didIterateCursor):
(WebKit::WebIDBConnectionToServer::fireVersionChangeEvent):
(WebKit::WebIDBConnectionToServer::didStartTransaction):
(WebKit::WebIDBConnectionToServer::notifyOpenDBRequestBlocked):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:

* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::didReceiveMessage):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServerh">trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBTransactionInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClientcpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServercpp">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServerh">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesWebToDatabaseProcessConnectioncpp">trunk/Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (196778 => 196779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-18 22:31:49 UTC (rev 196778)
+++ trunk/Source/WebCore/ChangeLog        2016-02-18 22:42:54 UTC (rev 196779)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-02-18  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Implement server-&gt;client operations in WK2.
+        https://bugs.webkit.org/show_bug.cgi?id=154411
+
+        Reviewed by Alex Christensen.
+
+        No change in behavior yet; Just laying the groundwork.
+    
+        * Modules/indexeddb/client/IDBConnectionToServer.h:
+        * Modules/indexeddb/server/IDBServer.h:
+        * Modules/indexeddb/shared/IDBTransactionInfo.h:
+        (WebCore::IDBTransactionInfo::encode):
+        (WebCore::IDBTransactionInfo::decode):
+
</ins><span class="cx"> 2016-02-18  Csaba Osztrogonác  &lt;ossy@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix unused-const-variable warning on non Cocoa platforms
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h (196778 => 196779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2016-02-18 22:31:49 UTC (rev 196778)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2016-02-18 22:42:54 UTC (rev 196779)
</span><span class="lines">@@ -57,57 +57,57 @@
</span><span class="cx">     uint64_t identifier() const;
</span><span class="cx"> 
</span><span class="cx">     void deleteDatabase(IDBOpenDBRequest&amp;);
</span><del>-    void didDeleteDatabase(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didDeleteDatabase(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void openDatabase(IDBOpenDBRequest&amp;);
</span><del>-    void didOpenDatabase(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didOpenDatabase(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void createObjectStore(TransactionOperation&amp;, const IDBObjectStoreInfo&amp;);
</span><del>-    void didCreateObjectStore(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didCreateObjectStore(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void deleteObjectStore(TransactionOperation&amp;, const String&amp; objectStoreName);
</span><del>-    void didDeleteObjectStore(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didDeleteObjectStore(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void clearObjectStore(TransactionOperation&amp;, uint64_t objectStoreIdentifier);
</span><del>-    void didClearObjectStore(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didClearObjectStore(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void createIndex(TransactionOperation&amp;, const IDBIndexInfo&amp;);
</span><del>-    void didCreateIndex(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didCreateIndex(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void deleteIndex(TransactionOperation&amp;, uint64_t objectStoreIdentifier, const String&amp; indexName);
</span><del>-    void didDeleteIndex(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didDeleteIndex(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void putOrAdd(TransactionOperation&amp;, RefPtr&lt;IDBKey&gt;&amp;, RefPtr&lt;SerializedScriptValue&gt;&amp;, const IndexedDB::ObjectStoreOverwriteMode);
</span><del>-    void didPutOrAdd(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didPutOrAdd(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void getRecord(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
</span><del>-    void didGetRecord(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didGetRecord(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void getCount(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
</span><del>-    void didGetCount(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didGetCount(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void deleteRecord(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
</span><del>-    void didDeleteRecord(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didDeleteRecord(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void openCursor(TransactionOperation&amp;, const IDBCursorInfo&amp;);
</span><del>-    void didOpenCursor(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didOpenCursor(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void iterateCursor(TransactionOperation&amp;, const IDBKeyData&amp;, unsigned long count);
</span><del>-    void didIterateCursor(const IDBResultData&amp;);
</del><ins>+    WEBCORE_EXPORT void didIterateCursor(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void commitTransaction(IDBTransaction&amp;);
</span><del>-    void didCommitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;);
</del><ins>+    WEBCORE_EXPORT void didCommitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void didFinishHandlingVersionChangeTransaction(IDBTransaction&amp;);
</span><span class="cx"> 
</span><span class="cx">     void abortTransaction(IDBTransaction&amp;);
</span><del>-    void didAbortTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;);
</del><ins>+    WEBCORE_EXPORT void didAbortTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;);
</ins><span class="cx"> 
</span><del>-    void fireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&amp; requestIdentifier, uint64_t requestedVersion);
</del><ins>+    WEBCORE_EXPORT void fireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&amp; requestIdentifier, uint64_t requestedVersion);
</ins><span class="cx">     void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&amp; requestIdentifier);
</span><span class="cx"> 
</span><del>-    void didStartTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;);
-    void notifyOpenDBRequestBlocked(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t oldVersion, uint64_t newVersion);
</del><ins>+    WEBCORE_EXPORT void didStartTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;);
+    WEBCORE_EXPORT void notifyOpenDBRequestBlocked(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t oldVersion, uint64_t newVersion);
</ins><span class="cx"> 
</span><span class="cx">     void establishTransaction(IDBTransaction&amp;);
</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 (196778 => 196779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2016-02-18 22:31:49 UTC (rev 196778)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2016-02-18 22:42:54 UTC (rev 196779)
</span><span class="lines">@@ -53,8 +53,8 @@
</span><span class="cx">     static Ref&lt;IDBServer&gt; create();
</span><span class="cx">     WEBCORE_EXPORT static Ref&lt;IDBServer&gt; create(const String&amp; databaseDirectoryPath);
</span><span class="cx"> 
</span><del>-    void registerConnection(IDBConnectionToClient&amp;);
-    void unregisterConnection(IDBConnectionToClient&amp;);
</del><ins>+    WEBCORE_EXPORT void registerConnection(IDBConnectionToClient&amp;);
+    WEBCORE_EXPORT void unregisterConnection(IDBConnectionToClient&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // Operations requested by the client.
</span><span class="cx">     WEBCORE_EXPORT void openDatabase(const IDBRequestData&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBTransactionInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h (196778 => 196779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h        2016-02-18 22:31:49 UTC (rev 196778)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h        2016-02-18 22:42:54 UTC (rev 196779)
</span><span class="lines">@@ -85,6 +85,10 @@
</span><span class="cx"> {
</span><span class="cx">     encoder &lt;&lt; m_identifier &lt;&lt; m_newVersion &lt;&lt; m_objectStores;
</span><span class="cx">     encoder.encodeEnum(m_mode);
</span><ins>+
+    encoder &lt;&lt; !!m_originalDatabaseInfo;
+    if (m_originalDatabaseInfo)
+        encoder &lt;&lt; *m_originalDatabaseInfo;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;class Decoder&gt;
</span><span class="lines">@@ -102,6 +106,17 @@
</span><span class="cx">     if (!decoder.decodeEnum(info.m_mode))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+    bool hasObject;
+    if (!decoder.decode(hasObject))
+        return false;
+
+    if (hasObject) {
+        std::unique_ptr&lt;IDBDatabaseInfo&gt; object = std::make_unique&lt;IDBDatabaseInfo&gt;();
+        if (!decoder.decode(*object))
+            return false;
+        info.m_originalDatabaseInfo = WTFMove(object);
+    }
+
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (196778 => 196779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-02-18 22:31:49 UTC (rev 196778)
+++ trunk/Source/WebKit2/ChangeLog        2016-02-18 22:42:54 UTC (rev 196779)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2016-02-18  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Implement server-&gt;client operations in WK2.
+        https://bugs.webkit.org/show_bug.cgi?id=154411
+
+        Reviewed by Alex Christensen.
+
+        No change in behavior yet; Just laying the groundwork.
+
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
+        (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
+        (WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):
+
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
+        (WebKit::WebIDBConnectionToServer::didDeleteDatabase):
+        (WebKit::WebIDBConnectionToServer::didOpenDatabase):
+        (WebKit::WebIDBConnectionToServer::didAbortTransaction):
+        (WebKit::WebIDBConnectionToServer::didCommitTransaction):
+        (WebKit::WebIDBConnectionToServer::didCreateObjectStore):
+        (WebKit::WebIDBConnectionToServer::didDeleteObjectStore):
+        (WebKit::WebIDBConnectionToServer::didClearObjectStore):
+        (WebKit::WebIDBConnectionToServer::didCreateIndex):
+        (WebKit::WebIDBConnectionToServer::didDeleteIndex):
+        (WebKit::WebIDBConnectionToServer::didPutOrAdd):
+        (WebKit::WebIDBConnectionToServer::didGetRecord):
+        (WebKit::WebIDBConnectionToServer::didGetCount):
+        (WebKit::WebIDBConnectionToServer::didDeleteRecord):
+        (WebKit::WebIDBConnectionToServer::didOpenCursor):
+        (WebKit::WebIDBConnectionToServer::didIterateCursor):
+        (WebKit::WebIDBConnectionToServer::fireVersionChangeEvent):
+        (WebKit::WebIDBConnectionToServer::didStartTransaction):
+        (WebKit::WebIDBConnectionToServer::notifyOpenDBRequestBlocked):
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
+        
+        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
+        (WebKit::WebToDatabaseProcessConnection::didReceiveMessage):
+
</ins><span class="cx"> 2016-02-18  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         RemoteInspector deadlocks if _WKAutomationDelegate creates/registers a target synchronously
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp (196778 => 196779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp        2016-02-18 22:31:49 UTC (rev 196778)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp        2016-02-18 22:42:54 UTC (rev 196779)
</span><span class="lines">@@ -48,13 +48,16 @@
</span><span class="cx"> 
</span><span class="cx"> WebIDBConnectionToClient::WebIDBConnectionToClient(DatabaseToWebProcessConnection&amp; connection, uint64_t serverConnectionIdentifier)
</span><span class="cx">     : m_connection(connection)
</span><ins>+    , m_identifier(serverConnectionIdentifier)
</ins><span class="cx"> {
</span><span class="cx">     relaxAdoptionRequirement();
</span><span class="cx">     m_connectionToClient = IDBServer::IDBConnectionToClient::create(*this);
</span><ins>+    DatabaseProcess::singleton().idbServer().registerConnection(*m_connectionToClient);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebIDBConnectionToClient::~WebIDBConnectionToClient()
</span><span class="cx"> {
</span><ins>+    DatabaseProcess::singleton().idbServer().unregisterConnection(*m_connectionToClient);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebIDBConnectionToClient::disconnectedFromWebProcess()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp (196778 => 196779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp        2016-02-18 22:31:49 UTC (rev 196778)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp        2016-02-18 22:42:54 UTC (rev 196779)
</span><span class="lines">@@ -189,76 +189,94 @@
</span><span class="cx">     send(Messages::WebIDBConnectionToClient::DidFireVersionChangeEvent(databaseConnectionIdentifier, requestIdentifier));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didDeleteDatabase(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didDeleteDatabase(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didDeleteDatabase(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didOpenDatabase(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didOpenDatabase(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didOpenDatabase(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didAbortTransaction(const IDBResourceIdentifier&amp;, const IDBError&amp;)
</del><ins>+void WebIDBConnectionToServer::didAbortTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp; error)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didAbortTransaction(transactionIdentifier, error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didCommitTransaction(const IDBResourceIdentifier&amp;, const IDBError&amp;)
</del><ins>+void WebIDBConnectionToServer::didCommitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp; error)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didCommitTransaction(transactionIdentifier, error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didCreateObjectStore(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didCreateObjectStore(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didCreateObjectStore(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didDeleteObjectStore(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didDeleteObjectStore(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didDeleteObjectStore(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didClearObjectStore(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didClearObjectStore(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didClearObjectStore(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didCreateIndex(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didCreateIndex(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didCreateIndex(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didDeleteIndex(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didDeleteIndex(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didDeleteIndex(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didPutOrAdd(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didPutOrAdd(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didPutOrAdd(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didGetRecord(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didGetRecord(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didGetRecord(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didGetCount(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didGetCount(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didGetCount(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didDeleteRecord(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didDeleteRecord(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didDeleteRecord(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didOpenCursor(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didOpenCursor(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didOpenCursor(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didIterateCursor(const IDBResultData&amp;)
</del><ins>+void WebIDBConnectionToServer::didIterateCursor(const IDBResultData&amp; result)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didIterateCursor(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::fireVersionChangeEvent(uint64_t, const WebCore::IDBResourceIdentifier&amp;, uint64_t)
</del><ins>+void WebIDBConnectionToServer::fireVersionChangeEvent(uint64_t uniqueDatabaseConnectionIdentifier, const IDBResourceIdentifier&amp; requestIdentifier, uint64_t requestedVersion)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;fireVersionChangeEvent(uniqueDatabaseConnectionIdentifier, requestIdentifier, requestedVersion);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::didStartTransaction(const WebCore::IDBResourceIdentifier&amp;, const WebCore::IDBError&amp;)
</del><ins>+void WebIDBConnectionToServer::didStartTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const WebCore::IDBError&amp; error)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;didStartTransaction(transactionIdentifier, error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::notifyOpenDBRequestBlocked(const WebCore::IDBResourceIdentifier&amp;, uint64_t, uint64_t)
</del><ins>+void WebIDBConnectionToServer::notifyOpenDBRequestBlocked(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t oldVersion, uint64_t newVersion)
</ins><span class="cx"> {
</span><ins>+    m_connectionToServer-&gt;notifyOpenDBRequestBlocked(requestIdentifier, oldVersion, newVersion);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h (196778 => 196779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h        2016-02-18 22:31:49 UTC (rev 196778)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h        2016-02-18 22:42:54 UTC (rev 196779)
</span><span class="lines">@@ -88,11 +88,12 @@
</span><span class="cx">     void didStartTransaction(const WebCore::IDBResourceIdentifier&amp; transactionIdentifier, const WebCore::IDBError&amp;);
</span><span class="cx">     void notifyOpenDBRequestBlocked(const WebCore::IDBResourceIdentifier&amp; requestIdentifier, uint64_t oldVersion, uint64_t newVersion);
</span><span class="cx"> 
</span><ins>+    void didReceiveMessage(IPC::Connection&amp;, IPC::MessageDecoder&amp;);
+
</ins><span class="cx"> private:
</span><span class="cx">     WebIDBConnectionToServer();
</span><span class="cx"> 
</span><span class="cx">     virtual IPC::Connection* messageSenderConnection() override final;
</span><del>-    void didReceiveMessage(IPC::Connection&amp;, IPC::MessageDecoder&amp;);
</del><span class="cx"> 
</span><span class="cx">     uint64_t m_identifier;
</span><span class="cx">     bool m_isOpenInServer { false };
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesWebToDatabaseProcessConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.cpp (196778 => 196779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.cpp        2016-02-18 22:31:49 UTC (rev 196778)
+++ trunk/Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.cpp        2016-02-18 22:42:54 UTC (rev 196779)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;WebToDatabaseProcessConnection.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DatabaseToWebProcessConnectionMessages.h&quot;
</span><ins>+#include &quot;WebIDBConnectionToServerMessages.h&quot;
</ins><span class="cx"> #include &quot;WebIDBServerConnection.h&quot;
</span><span class="cx"> #include &quot;WebIDBServerConnectionMessages.h&quot;
</span><span class="cx"> #include &quot;WebProcess.h&quot;
</span><span class="lines">@@ -52,6 +53,13 @@
</span><span class="cx"> void WebToDatabaseProcessConnection::didReceiveMessage(IPC::Connection&amp; connection, IPC::MessageDecoder&amp; decoder)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><ins>+    if (decoder.messageReceiverName() == Messages::WebIDBConnectionToServer::messageReceiverName()) {
+        auto iterator = m_webIDBConnections.find(decoder.destinationID());
+        if (iterator != m_webIDBConnections.end())
+            iterator-&gt;value-&gt;didReceiveMessage(connection, decoder);
+        return;
+    }
+
</ins><span class="cx">     if (decoder.messageReceiverName() == Messages::WebIDBServerConnection::messageReceiverName()) {
</span><span class="cx">         HashMap&lt;uint64_t, WebIDBServerConnection*&gt;::iterator connectionIterator = m_webIDBServerConnections.find(decoder.destinationID());
</span><span class="cx">         if (connectionIterator != m_webIDBServerConnections.end())
</span></span></pre>
</div>
</div>

</body>
</html>