Modern IDB: Implement client->server operations in WK2.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Feb 2016 20:23:51 +0000 (20:23 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Feb 2016 20:23:51 +0000 (20:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154400

Reviewed by Alex Christensen.

No change in behavior yet; Just laying the groundwork.

Source/WebCore:

* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/UniqueIDBDatabase.h:
* Modules/indexeddb/shared/IDBIndexInfo.h:
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:

Source/WebKit2:

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::idbServer):
* DatabaseProcess/DatabaseProcess.h:

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196771 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/IDBServer.h
Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h
Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.h
Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp
Source/WebKit2/DatabaseProcess/DatabaseProcess.h
Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h
Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h
Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in

index f6c26e8..a1f20ac 100644 (file)
@@ -1,3 +1,17 @@
+2016-02-18  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: Implement client->server operations in WK2.
+        https://bugs.webkit.org/show_bug.cgi?id=154400
+
+        Reviewed by Alex Christensen.
+
+        No change in behavior yet; Just laying the groundwork.
+
+        * Modules/indexeddb/server/IDBServer.h:
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+        * Modules/indexeddb/shared/IDBIndexInfo.h:
+        * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
+
 2016-02-18  Chris Dumez  <cdumez@apple.com>
 
         [Unforgeable] operations should not be writable as per Web IDL
index 4c32855..25283ca 100644 (file)
@@ -51,33 +51,33 @@ namespace IDBServer {
 class IDBServer : public RefCounted<IDBServer> {
 public:
     static Ref<IDBServer> create();
-    static Ref<IDBServer> create(const String& databaseDirectoryPath);
+    WEBCORE_EXPORT static Ref<IDBServer> create(const String& databaseDirectoryPath);
 
     void registerConnection(IDBConnectionToClient&);
     void unregisterConnection(IDBConnectionToClient&);
 
     // Operations requested by the client.
-    void openDatabase(const IDBRequestData&);
-    void deleteDatabase(const IDBRequestData&);
-    void abortTransaction(const IDBResourceIdentifier&);
-    void commitTransaction(const IDBResourceIdentifier&);
-    void didFinishHandlingVersionChangeTransaction(const IDBResourceIdentifier&);
-    void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&);
-    void deleteObjectStore(const IDBRequestData&, const String& objectStoreName);
-    void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier);
-    void createIndex(const IDBRequestData&, const IDBIndexInfo&);
-    void deleteIndex(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& indexName);
-    void putOrAdd(const IDBRequestData&, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode);
-    void getRecord(const IDBRequestData&, const IDBKeyRangeData&);
-    void getCount(const IDBRequestData&, const IDBKeyRangeData&);
-    void deleteRecord(const IDBRequestData&, const IDBKeyRangeData&);
-    void openCursor(const IDBRequestData&, const IDBCursorInfo&);
-    void iterateCursor(const IDBRequestData&, const IDBKeyData&, unsigned long count);
-
-    void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&);
-    void databaseConnectionClosed(uint64_t databaseConnectionIdentifier);
-    void abortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& transactionIdentifier);
-    void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& requestIdentifier);
+    WEBCORE_EXPORT void openDatabase(const IDBRequestData&);
+    WEBCORE_EXPORT void deleteDatabase(const IDBRequestData&);
+    WEBCORE_EXPORT void abortTransaction(const IDBResourceIdentifier&);
+    WEBCORE_EXPORT void commitTransaction(const IDBResourceIdentifier&);
+    WEBCORE_EXPORT void didFinishHandlingVersionChangeTransaction(const IDBResourceIdentifier&);
+    WEBCORE_EXPORT void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&);
+    WEBCORE_EXPORT void deleteObjectStore(const IDBRequestData&, const String& objectStoreName);
+    WEBCORE_EXPORT void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier);
+    WEBCORE_EXPORT void createIndex(const IDBRequestData&, const IDBIndexInfo&);
+    WEBCORE_EXPORT void deleteIndex(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& indexName);
+    WEBCORE_EXPORT void putOrAdd(const IDBRequestData&, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode);
+    WEBCORE_EXPORT void getRecord(const IDBRequestData&, const IDBKeyRangeData&);
+    WEBCORE_EXPORT void getCount(const IDBRequestData&, const IDBKeyRangeData&);
+    WEBCORE_EXPORT void deleteRecord(const IDBRequestData&, const IDBKeyRangeData&);
+    WEBCORE_EXPORT void openCursor(const IDBRequestData&, const IDBCursorInfo&);
+    WEBCORE_EXPORT void iterateCursor(const IDBRequestData&, const IDBKeyData&, unsigned long count);
+
+    WEBCORE_EXPORT void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&);
+    WEBCORE_EXPORT void databaseConnectionClosed(uint64_t databaseConnectionIdentifier);
+    WEBCORE_EXPORT void abortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& transactionIdentifier);
+    WEBCORE_EXPORT void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& requestIdentifier);
 
     void postDatabaseTask(std::unique_ptr<CrossThreadTask>&&);
     void postDatabaseTaskReply(std::unique_ptr<CrossThreadTask>&&);
index f10f708..1caacd6 100644 (file)
@@ -72,7 +72,7 @@ public:
         return adoptRef(*new UniqueIDBDatabase(server, identifier));
     }
 
-    ~UniqueIDBDatabase();
+    WEBCORE_EXPORT ~UniqueIDBDatabase();
 
     void openDatabaseConnection(IDBConnectionToClient&, const IDBRequestData&);
 
index d39d2c3..89ad5ae 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
 
 class IDBIndexInfo {
 public:
-    IDBIndexInfo();
+    WEBCORE_EXPORT IDBIndexInfo();
     IDBIndexInfo(uint64_t identifier, uint64_t objectStoreIdentifier, const String& name, const IDBKeyPath&, bool unique, bool multiEntry);
 
     IDBIndexInfo isolatedCopy() const;
index 8efc5b9..094b004 100644 (file)
@@ -39,7 +39,7 @@ class IDBKeyPath;
 
 class IDBObjectStoreInfo {
 public:
-    IDBObjectStoreInfo();
+    WEBCORE_EXPORT IDBObjectStoreInfo();
     IDBObjectStoreInfo(uint64_t identifier, const String& name, const IDBKeyPath&, bool autoIncrement);
 
     uint64_t identifier() const { return m_identifier; }
index 7a7f24b..eac56f1 100644 (file)
@@ -1,3 +1,44 @@
+2016-02-18  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: Implement client->server operations in WK2.
+        https://bugs.webkit.org/show_bug.cgi?id=154400
+
+        Reviewed by Alex Christensen.
+
+        No change in behavior yet; Just laying the groundwork.
+
+        * DatabaseProcess/DatabaseProcess.cpp:
+        (WebKit::DatabaseProcess::idbServer):
+        * DatabaseProcess/DatabaseProcess.h:
+
+        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
+        (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
+        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
+
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
+        (WebKit::WebIDBConnectionToClient::deleteDatabase):
+        (WebKit::WebIDBConnectionToClient::openDatabase):
+        (WebKit::WebIDBConnectionToClient::abortTransaction):
+        (WebKit::WebIDBConnectionToClient::commitTransaction):
+        (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
+        (WebKit::WebIDBConnectionToClient::createObjectStore):
+        (WebKit::WebIDBConnectionToClient::deleteObjectStore):
+        (WebKit::WebIDBConnectionToClient::clearObjectStore):
+        (WebKit::WebIDBConnectionToClient::createIndex):
+        (WebKit::WebIDBConnectionToClient::deleteIndex):
+        (WebKit::WebIDBConnectionToClient::putOrAdd):
+        (WebKit::WebIDBConnectionToClient::getRecord):
+        (WebKit::WebIDBConnectionToClient::getCount):
+        (WebKit::WebIDBConnectionToClient::deleteRecord):
+        (WebKit::WebIDBConnectionToClient::openCursor):
+        (WebKit::WebIDBConnectionToClient::iterateCursor):
+        (WebKit::WebIDBConnectionToClient::establishTransaction):
+        (WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
+        (WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
+        (WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
+
 2016-02-18  ChangSeok Oh  <changseok.oh@collabora.com>
 
         [GTK][Threaded Compositor] The web inspector doesn't work when using the threaded compositor
index 0c5d928..f32f17f 100644 (file)
@@ -115,6 +115,14 @@ void DatabaseProcess::removeLegacyUniqueIDBDatabase(const LegacyUniqueIDBDatabas
 
     m_idbDatabases.remove(identifier);
 }
+
+IDBServer::IDBServer& DatabaseProcess::idbServer()
+{
+    if (!m_idbServer)
+        m_idbServer = IDBServer::IDBServer::create(indexedDatabaseDirectory());
+
+    return *m_idbServer;
+}
 #endif
 
 void DatabaseProcess::initializeDatabaseProcess(const DatabaseProcessCreationParameters& parameters)
index f7430d5..fb1df4f 100644 (file)
 #if ENABLE(DATABASE_PROCESS)
 
 #include "ChildProcess.h"
+#include "LegacyUniqueIDBDatabase.h"
 #include "LegacyUniqueIDBDatabaseIdentifier.h"
+#include <WebCore/IDBServer.h>
+#include <WebCore/UniqueIDBDatabase.h>
 #include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
@@ -41,7 +44,6 @@ struct SecurityOriginData;
 namespace WebKit {
 
 class DatabaseToWebProcessConnection;
-class LegacyUniqueIDBDatabase;
 
 struct DatabaseProcessCreationParameters;
 
@@ -60,6 +62,8 @@ public:
 
     void ensureIndexedDatabaseRelativePathExists(const String&);
     String absoluteIndexedDatabasePathFromDatabaseRelativePath(const String&);
+
+    WebCore::IDBServer::IDBServer& idbServer();
 #endif
 
     WorkQueue& queue() { return m_queue.get(); }
@@ -110,6 +114,8 @@ private:
     String m_indexedDatabaseDirectory;
 
     HashMap<LegacyUniqueIDBDatabaseIdentifier, RefPtr<LegacyUniqueIDBDatabase>> m_idbDatabases;
+
+    RefPtr<WebCore::IDBServer::IDBServer> m_idbServer;
 #endif
 
     Deque<std::unique_ptr<WebCore::CrossThreadTask>> m_databaseTasks;
index 9a35980..6f08f04 100644 (file)
@@ -31,6 +31,7 @@
 #include "DatabaseToWebProcessConnectionMessages.h"
 #include "Logging.h"
 #include "WebIDBConnectionToClient.h"
+#include "WebIDBConnectionToClientMessages.h"
 #include <wtf/RunLoop.h>
 
 #if ENABLE(DATABASE_PROCESS)
@@ -62,6 +63,13 @@ void DatabaseToWebProcessConnection::didReceiveMessage(IPC::Connection& connecti
     }
 
 #if ENABLE(INDEXED_DATABASE)
+    if (decoder.messageReceiverName() == Messages::WebIDBConnectionToClient::messageReceiverName()) {
+        auto iterator = m_webIDBConnections.find(decoder.destinationID());
+        if (iterator != m_webIDBConnections.end())
+            iterator->value->didReceiveMessage(connection, decoder);
+        return;
+    }
+    
     if (decoder.messageReceiverName() == Messages::DatabaseProcessIDBConnection::messageReceiverName()) {
         IDBConnectionMap::iterator backendIterator = m_idbConnections.find(decoder.destinationID());
         if (backendIterator != m_idbConnections.end())
index 328ba91..a7885d1 100644 (file)
@@ -32,8 +32,8 @@
 #include "DatabaseProcess.h"
 #include "DatabaseToWebProcessConnection.h"
 #include "IDBIdentifier.h"
-#include "Logging.h"
 #include "LegacyUniqueIDBDatabase.h"
+#include "Logging.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebIDBServerConnectionMessages.h"
 #include <WebCore/IDBDatabaseMetadata.h>
index 55026e5..bd993c0 100644 (file)
@@ -31,6 +31,7 @@
 #if ENABLE(INDEXED_DATABASE) && ENABLE(DATABASE_PROCESS)
 
 #include "DatabaseProcessIDBConnectionMessages.h"
+#include "LegacyUniqueIDBDatabase.h"
 #include "LegacyUniqueIDBDatabaseIdentifier.h"
 #include <WebCore/SecurityOriginData.h>
 #include <wtf/text/WTFString.h>
@@ -43,7 +44,6 @@ struct IDBKeyRangeData;
 namespace WebKit {
 
 class DatabaseToWebProcessConnection;
-class LegacyUniqueIDBDatabase;
 
 class DatabaseProcessIDBConnection : public RefCounted<DatabaseProcessIDBConnection>, public IPC::MessageSender {
 public:
index 58b4692..2ef6ef8 100644 (file)
 
 #if ENABLE(INDEXED_DATABASE)
 
+#include "DataReference.h"
+#include "DatabaseProcess.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebIDBConnectionToServerMessages.h"
 #include <WebCore/IDBError.h>
 #include <WebCore/IDBResultData.h>
+#include <WebCore/ThreadSafeDataBuffer.h>
 #include <WebCore/UniqueIDBDatabaseConnection.h>
 
 using namespace WebCore;
@@ -158,84 +161,115 @@ void WebIDBConnectionToClient::notifyOpenDBRequestBlocked(const WebCore::IDBReso
     send(Messages::WebIDBConnectionToServer::NotifyOpenDBRequestBlocked(requestIdentifier, oldVersion, newVersion));
 }
 
-void WebIDBConnectionToClient::deleteDatabase(const IDBRequestData&)
+void WebIDBConnectionToClient::deleteDatabase(const IDBRequestData& request)
 {
+    DatabaseProcess::singleton().idbServer().deleteDatabase(request);
 }
 
-void WebIDBConnectionToClient::openDatabase(const IDBRequestData&)
+void WebIDBConnectionToClient::openDatabase(const IDBRequestData& request)
 {
+    DatabaseProcess::singleton().idbServer().openDatabase(request);
 }
 
-void WebIDBConnectionToClient::abortTransaction(const IDBResourceIdentifier&)
+void WebIDBConnectionToClient::abortTransaction(const IDBResourceIdentifier& transactionIdentifier)
 {
+    DatabaseProcess::singleton().idbServer().abortTransaction(transactionIdentifier);
 }
 
-void WebIDBConnectionToClient::commitTransaction(const IDBResourceIdentifier&)
+void WebIDBConnectionToClient::commitTransaction(const IDBResourceIdentifier& transactionIdentifier)
 {
+    DatabaseProcess::singleton().idbServer().commitTransaction(transactionIdentifier);
 }
 
-void WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction(const IDBResourceIdentifier&)
+void WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction(const IDBResourceIdentifier& transactionIdentifier)
 {
+    DatabaseProcess::singleton().idbServer().didFinishHandlingVersionChangeTransaction(transactionIdentifier);
 }
 
-void WebIDBConnectionToClient::createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&)
+void WebIDBConnectionToClient::createObjectStore(const IDBRequestData& request, const IDBObjectStoreInfo& info)
 {
+    DatabaseProcess::singleton().idbServer().createObjectStore(request, info);
 }
 
-void WebIDBConnectionToClient::deleteObjectStore(const IDBRequestData&, const String&)
+void WebIDBConnectionToClient::deleteObjectStore(const IDBRequestData& request, const String& name)
 {
+    DatabaseProcess::singleton().idbServer().deleteObjectStore(request, name);
 }
 
-void WebIDBConnectionToClient::clearObjectStore(const IDBRequestData&, uint64_t)
+void WebIDBConnectionToClient::clearObjectStore(const IDBRequestData& request, uint64_t objectStoreIdentifier)
 {
+    DatabaseProcess::singleton().idbServer().clearObjectStore(request, objectStoreIdentifier);
 }
 
-void WebIDBConnectionToClient::createIndex(const IDBRequestData&, const IDBIndexInfo&)
+void WebIDBConnectionToClient::createIndex(const IDBRequestData& request, const IDBIndexInfo& info)
 {
+    DatabaseProcess::singleton().idbServer().createIndex(request, info);
 }
 
-void WebIDBConnectionToClient::deleteIndex(const IDBRequestData&, uint64_t, const String&)
+void WebIDBConnectionToClient::deleteIndex(const IDBRequestData& request, uint64_t objectStoreIdentifier, const String& name)
 {
+    DatabaseProcess::singleton().idbServer().deleteIndex(request, objectStoreIdentifier, name);
 }
 
-void WebIDBConnectionToClient::putOrAdd(const IDBRequestData&, const IDBKeyData&, const IPC::DataReference&, bool)
+void WebIDBConnectionToClient::putOrAdd(const IDBRequestData& request, const IDBKeyData& key, const IPC::DataReference& data, unsigned overwriteMode)
 {
+    if (overwriteMode != static_cast<unsigned>(IndexedDB::ObjectStoreOverwriteMode::NoOverwrite)
+        && overwriteMode != static_cast<unsigned>(IndexedDB::ObjectStoreOverwriteMode::Overwrite)
+        && overwriteMode != static_cast<unsigned>(IndexedDB::ObjectStoreOverwriteMode::OverwriteForCursor)) {
+        // FIXME: This message from the WebProcess is corrupt.
+        // The DatabaseProcess should return early at this point, but can we also kill the bad WebProcess?
+        return;
+    }
+
+    IndexedDB::ObjectStoreOverwriteMode mode = static_cast<IndexedDB::ObjectStoreOverwriteMode>(overwriteMode);
+    auto buffer = ThreadSafeDataBuffer::copyVector(data.vector());
+
+    DatabaseProcess::singleton().idbServer().putOrAdd(request, key, buffer, mode);
 }
 
-void WebIDBConnectionToClient::getRecord(const IDBRequestData&, const IDBKeyRangeData&)
+void WebIDBConnectionToClient::getRecord(const IDBRequestData& request, const IDBKeyRangeData& range)
 {
+    DatabaseProcess::singleton().idbServer().getRecord(request, range);
 }
 
-void WebIDBConnectionToClient::getCount(const IDBRequestData&, const IDBKeyRangeData&)
+void WebIDBConnectionToClient::getCount(const IDBRequestData& request, const IDBKeyRangeData& range)
 {
+    DatabaseProcess::singleton().idbServer().getCount(request, range);
 }
 
-void WebIDBConnectionToClient::deleteRecord(const IDBRequestData&, const IDBKeyRangeData&)
+void WebIDBConnectionToClient::deleteRecord(const IDBRequestData& request, const IDBKeyRangeData& range)
 {
+    DatabaseProcess::singleton().idbServer().deleteRecord(request, range);
 }
 
-void WebIDBConnectionToClient::openCursor(const IDBRequestData&, const IDBCursorInfo&)
+void WebIDBConnectionToClient::openCursor(const IDBRequestData& request, const IDBCursorInfo& info)
 {
+    DatabaseProcess::singleton().idbServer().openCursor(request, info);
 }
 
-void WebIDBConnectionToClient::iterateCursor(const IDBRequestData&, const IDBKeyData&, unsigned long)
+void WebIDBConnectionToClient::iterateCursor(const IDBRequestData& request, const IDBKeyData& key, unsigned long count)
 {
+    DatabaseProcess::singleton().idbServer().iterateCursor(request, key, count);
 }
 
-void WebIDBConnectionToClient::establishTransaction(uint64_t, const IDBTransactionInfo&)
+void WebIDBConnectionToClient::establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo& info)
 {
+    DatabaseProcess::singleton().idbServer().establishTransaction(databaseConnectionIdentifier, info);
 }
 
-void WebIDBConnectionToClient::databaseConnectionClosed(uint64_t)
+void WebIDBConnectionToClient::databaseConnectionClosed(uint64_t databaseConnectionIdentifier)
 {
+    DatabaseProcess::singleton().idbServer().databaseConnectionClosed(databaseConnectionIdentifier);
 }
 
-void WebIDBConnectionToClient::abortOpenAndUpgradeNeeded(uint64_t, const IDBResourceIdentifier&)
+void WebIDBConnectionToClient::abortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& transactionIdentifier)
 {
+    DatabaseProcess::singleton().idbServer().abortOpenAndUpgradeNeeded(databaseConnectionIdentifier, transactionIdentifier);
 }
 
-void WebIDBConnectionToClient::didFireVersionChangeEvent(uint64_t, const IDBResourceIdentifier&)
+void WebIDBConnectionToClient::didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& transactionIdentifier)
 {
+    DatabaseProcess::singleton().idbServer().didFireVersionChangeEvent(databaseConnectionIdentifier, transactionIdentifier);
 }
 
 } // namespace WebKit
index 0e75d1d..de95de8 100644 (file)
@@ -88,7 +88,7 @@ public:
     void clearObjectStore(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier);
     void createIndex(const WebCore::IDBRequestData&, const WebCore::IDBIndexInfo&);
     void deleteIndex(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier, const String& indexName);
-    void putOrAdd(const WebCore::IDBRequestData&, const WebCore::IDBKeyData&, const IPC::DataReference& value, bool overwriteEnabled);
+    void putOrAdd(const WebCore::IDBRequestData&, const WebCore::IDBKeyData&, const IPC::DataReference& value, unsigned overwriteMode);
     void getRecord(const WebCore::IDBRequestData&, const WebCore::IDBKeyRangeData&);
     void getCount(const WebCore::IDBRequestData&, const WebCore::IDBKeyRangeData&);
     void deleteRecord(const WebCore::IDBRequestData&, const WebCore::IDBKeyRangeData&);
@@ -102,11 +102,12 @@ public:
 
     void disconnectedFromWebProcess();
 
+    void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&);
+
 private:
     WebIDBConnectionToClient(DatabaseToWebProcessConnection&, uint64_t serverConnectionIdentifier);
 
     virtual IPC::Connection* messageSenderConnection() override final;
-    void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&);
 
     Ref<DatabaseToWebProcessConnection> m_connection;
 
index 802e67b..94f8f2f 100644 (file)
@@ -33,7 +33,7 @@ messages -> WebIDBConnectionToClient {
     ClearObjectStore(WebCore::IDBRequestData requestData, uint64_t objectStoreIdentifier);
     CreateIndex(WebCore::IDBRequestData requestData, WebCore::IDBIndexInfo info);
     DeleteIndex(WebCore::IDBRequestData requestData, uint64_t objectStoreIdentifier, String indexName);
-    PutOrAdd(WebCore::IDBRequestData requestData, WebCore::IDBKeyData key, IPC::DataReference value, bool overwriteEnabled);
+    PutOrAdd(WebCore::IDBRequestData requestData, WebCore::IDBKeyData key, IPC::DataReference value, unsigned overwriteMode);
     GetRecord(WebCore::IDBRequestData requestData, struct WebCore::IDBKeyRangeData range);
     GetCount(WebCore::IDBRequestData requestData, struct WebCore::IDBKeyRangeData range);
     DeleteRecord(WebCore::IDBRequestData requestData, struct WebCore::IDBKeyRangeData range);