IDB: Implement cross-thread and IPC plumbing for 'get' support
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jan 2014 20:25:34 +0000 (20:25 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jan 2014 20:25:34 +0000 (20:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=127501

Reviewed by Anders Carlsson.

Source/WebCore:

Add isolatedCopy to the IDBGetResult object:
* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::isolatedCopy):

Add a cross-thread and cross-IPC appropriate object for IDBKeyRanges:
* Modules/indexeddb/IDBKeyRangeData.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
(WebCore::IDBKeyRangeData::isolatedCopy):
* Modules/indexeddb/IDBKeyRangeData.h: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
(WebCore::IDBKeyRangeData::IDBKeyRangeData):

Add a few more cross-thread copiers:
* platform/CrossThreadCopier.cpp:
(WebCore::IDBGetResult>::copy):
(WebCore::IDBKeyRangeData>::copy):
* platform/CrossThreadCopier.h:

Project file gunk:
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

Make the WebProcess call out to the DatabaseProcess with a get request, and handle the
response from the DatabaseProcess:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::get):
(WebKit::WebIDBServerConnection::didGetRecord):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Get the request from the WebProcess and forward it to the appropriate unique IDB database:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::getRecord):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Forward the request to the database thread, and response to the result from that thread:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::getRecord):
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
(WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

IPC and asynchronous request infrastructure:
* Scripts/webkit2/messages.py:
(struct_or_class):

* Shared/AsyncTask.h:
(WebKit::createAsyncTask):

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBGetResult>::encode):
(IPC::ArgumentCoder<IDBGetResult>::decode):
(IPC::ArgumentCoder<IDBKeyRangeData>::encode):
(IPC::ArgumentCoder<IDBKeyRangeData>::decode):
* Shared/WebCoreArgumentCoders.h:

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

23 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/indexeddb/IDBGetResult.h
Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp [new file with mode: 0644]
Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h [new file with mode: 0644]
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/CrossThreadCopier.cpp
Source/WebCore/platform/CrossThreadCopier.h
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in
Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h
Source/WebKit2/Scripts/webkit2/messages.py
Source/WebKit2/Shared/AsyncTask.h
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
Source/WebKit2/Shared/WebCoreArgumentCoders.h
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.h
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in

index 5feb077..df3727f 100644 (file)
@@ -814,6 +814,7 @@ set(WebCore_SOURCES
     Modules/indexeddb/IDBKeyData.cpp
     Modules/indexeddb/IDBKeyPath.cpp
     Modules/indexeddb/IDBKeyRange.cpp
+    Modules/indexeddb/IDBKeyRangeData.cpp
     Modules/indexeddb/IDBObjectStore.cpp
     Modules/indexeddb/IDBOpenDBRequest.cpp
     Modules/indexeddb/IDBPendingTransactionMonitor.cpp
index d82cb0a..9aeecb8 100644 (file)
@@ -1,3 +1,32 @@
+2014-01-23  Brady Eidson  <beidson@apple.com>
+
+        IDB: Implement cross-thread and IPC plumbing for 'get' support
+        https://bugs.webkit.org/show_bug.cgi?id=127501
+
+        Reviewed by Anders Carlsson.
+
+        Add isolatedCopy to the IDBGetResult object:
+        * Modules/indexeddb/IDBGetResult.h:
+        (WebCore::IDBGetResult::isolatedCopy):
+
+        Add a cross-thread and cross-IPC appropriate object for IDBKeyRanges:
+        * Modules/indexeddb/IDBKeyRangeData.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
+        (WebCore::IDBKeyRangeData::isolatedCopy):
+        * Modules/indexeddb/IDBKeyRangeData.h: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
+        (WebCore::IDBKeyRangeData::IDBKeyRangeData):
+
+        Add a few more cross-thread copiers:
+        * platform/CrossThreadCopier.cpp:
+        (WebCore::IDBGetResult>::copy):
+        (WebCore::IDBKeyRangeData>::copy):
+        * platform/CrossThreadCopier.h:
+
+        Project file gunk:
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * WebCore.exp.in:
+        * WebCore.xcodeproj/project.pbxproj:
+
 2014-01-23  Jer Noble  <jer.noble@apple.com>
 
         [MSE][Mac] Adopt new AVStreamDataParser delegate API
index 5cebbc6..772f156 100644 (file)
@@ -1840,6 +1840,7 @@ webcore_modules_sources += \
        Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h \
        Source/WebCore/Modules/indexeddb/IDBFactory.cpp \
        Source/WebCore/Modules/indexeddb/IDBFactory.h \
+       Source/WebCore/Modules/indexeddb/IDBGetResult.h \
        Source/WebCore/Modules/indexeddb/IDBHistograms.h \
        Source/WebCore/Modules/indexeddb/IDBIndex.cpp \
        Source/WebCore/Modules/indexeddb/IDBIndex.h \
@@ -1851,6 +1852,8 @@ webcore_modules_sources += \
        Source/WebCore/Modules/indexeddb/IDBKeyPath.h \
        Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp \
        Source/WebCore/Modules/indexeddb/IDBKeyRange.h \
+       Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp \
+       Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h \
        Source/WebCore/Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp \
        Source/WebCore/Modules/indexeddb/leveldb/IDBLevelDBCoding.h \
        Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp \
index 8ce40ac..04ae0f4 100644 (file)
@@ -57,6 +57,17 @@ struct IDBGetResult {
     {
     }
 
+    IDBGetResult isolatedCopy() const
+    {
+        IDBGetResult result;
+        if (valueBuffer)
+            result.valueBuffer = valueBuffer->copy();
+
+        result.keyData = keyData.isolatedCopy();
+        result.keyPath = keyPath.isolatedCopy();
+        return result;
+    }
+
     RefPtr<SharedBuffer> valueBuffer;
     IDBKeyData keyData;
     IDBKeyPath keyPath;
diff --git a/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp b/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp
new file mode 100644 (file)
index 0000000..84a5d49
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2014 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 "config.h"
+#include "IDBKeyRangeData.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+IDBKeyRangeData IDBKeyRangeData::isolatedCopy() const
+{
+    IDBKeyRangeData result;
+
+    result.isNull = isNull;
+    result.lowerKey = lowerKey.isolatedCopy();
+    result.upperKey = upperKey.isolatedCopy();
+    result.lowerOpen = lowerOpen;
+    result.upperOpen = upperOpen;
+
+    return result;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h b/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h
new file mode 100644 (file)
index 0000000..6ae8f88
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2014 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 IDBKeyRangeData_h
+#define IDBKeyRangeData_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBKeyData.h"
+#include "IDBKeyRange.h"
+
+namespace WebCore {
+
+struct IDBKeyRangeData {
+    IDBKeyRangeData()
+        : isNull(true)
+        , lowerOpen(false)
+        , upperOpen(false)
+    {
+    }
+
+    IDBKeyRangeData(IDBKeyRange* keyRange)
+        : isNull(!keyRange)
+        , lowerOpen(false)
+        , upperOpen(false)
+    {
+        if (isNull)
+            return;
+
+        lowerKey = keyRange->lower().get();
+        upperKey = keyRange->upper().get();
+        lowerOpen = keyRange->lowerOpen();
+        upperOpen = keyRange->upperOpen();
+    }
+
+    IDBKeyRangeData isolatedCopy() const;
+
+    bool isNull;
+
+    IDBKeyData lowerKey;
+    IDBKeyData upperKey;
+
+    bool lowerOpen;
+    bool upperOpen;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBKeyRangeData_h
index 7abe9f3..af329b3 100644 (file)
@@ -3090,7 +3090,10 @@ __ZN7WebCore18IDBDatabaseBackend14openConnectionEN3WTF10PassRefPtrINS_12IDBCallb
 __ZN7WebCore18IDBDatabaseBackend6createERKN3WTF6StringES4_PNS_26IDBFactoryBackendInterfaceERNS_19IDBServerConnectionE
 __ZN7WebCore18IDBDatabaseBackendD1Ev
 __ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_10IDBKeyDataEE4copyERKS1_
+__ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_12IDBGetResultEE4copyERKS1_
+__ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_15IDBKeyRangeDataEE4copyERKS1_
 __ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_22IDBObjectStoreMetadataEE4copyERKS1_
+__ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_9IndexedDB10CursorTypeEE4copyERKS2_
 __ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_9IndexedDB15TransactionModeEE4copyERKS2_
 __ZN7WebCore6IDBKeyD1Ev
 #endif
index fc031cc..007dc25 100644 (file)
                511EF2D117F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511EF2CE17F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp */; };
                511F23190DC160DA004F0032 /* StorageThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511F23150DC160DA004F0032 /* StorageThread.cpp */; };
                511F231A0DC160DA004F0032 /* StorageThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 511F23160DC160DA004F0032 /* StorageThread.h */; };
+               5123AF181890A4CA0031CDC9 /* IDBKeyRangeData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5123AF161890A4CA0031CDC9 /* IDBKeyRangeData.cpp */; };
+               5123AF191890A4CA0031CDC9 /* IDBKeyRangeData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5123AF171890A4CA0031CDC9 /* IDBKeyRangeData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5123AF1D18918AE40031CDC9 /* IDBGetResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 5123AF1C18918AE40031CDC9 /* IDBGetResult.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5126E6BB0A2E3B12005C29FA /* IconDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5126E6B90A2E3B12005C29FA /* IconDatabase.cpp */; };
                5126E6BC0A2E3B12005C29FA /* IconDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 5126E6BA0A2E3B12005C29FA /* IconDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
                511EF2CE17F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBObjectStoreCustom.cpp; sourceTree = "<group>"; };
                511F23150DC160DA004F0032 /* StorageThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageThread.cpp; sourceTree = "<group>"; };
                511F23160DC160DA004F0032 /* StorageThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageThread.h; sourceTree = "<group>"; };
+               5123AF161890A4CA0031CDC9 /* IDBKeyRangeData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBKeyRangeData.cpp; sourceTree = "<group>"; };
+               5123AF171890A4CA0031CDC9 /* IDBKeyRangeData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBKeyRangeData.h; sourceTree = "<group>"; };
                5123AF1C18918AE40031CDC9 /* IDBGetResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBGetResult.h; sourceTree = "<group>"; };
                5126E6B90A2E3B12005C29FA /* IconDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IconDatabase.cpp; sourceTree = "<group>"; };
                5126E6BA0A2E3B12005C29FA /* IconDatabase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IconDatabase.h; sourceTree = "<group>"; };
                                51D71995181106E00016DC51 /* IDBKeyRange.cpp */,
                                51D71996181106E00016DC51 /* IDBKeyRange.h */,
                                51D71997181106E00016DC51 /* IDBKeyRange.idl */,
+                               5123AF161890A4CA0031CDC9 /* IDBKeyRangeData.cpp */,
+                               5123AF171890A4CA0031CDC9 /* IDBKeyRangeData.h */,
                                51D71999181106E00016DC51 /* IDBObjectStore.cpp */,
                                51D7199A181106E00016DC51 /* IDBObjectStore.h */,
                                51D7199B181106E00016DC51 /* IDBObjectStore.idl */,
                                0F54DCDA1880F867003EEDBB /* DOMTouchInternal.h in Headers */,
                                B2FA3E0D0AB75A6F000E5AC4 /* JSSVGTransformList.h in Headers */,
                                07277E4F17D018CC0015534D /* JSMediaStreamAudioDestinationNode.h in Headers */,
+                               5123AF191890A4CA0031CDC9 /* IDBKeyRangeData.h in Headers */,
                                B2FA3E0F0AB75A6F000E5AC4 /* JSSVGTRefElement.h in Headers */,
                                B2FA3E110AB75A6F000E5AC4 /* JSSVGTSpanElement.h in Headers */,
                                B2FA3E130AB75A6F000E5AC4 /* JSSVGUnitTypes.h in Headers */,
                                A781C6A713828B5D0012A62A /* DocumentMarker.cpp in Sources */,
                                CE057FA51220731100A476D5 /* DocumentMarkerController.cpp in Sources */,
                                076306DC17E15FB0005A7C4E /* JSMediaStreamTrackSourcesCallback.cpp in Sources */,
+                               5123AF181890A4CA0031CDC9 /* IDBKeyRangeData.cpp in Sources */,
                                14947FFD12F80CD200A0F631 /* DocumentOrderedMap.cpp in Sources */,
                                A8C2280E11D4A59700D5A7D3 /* DocumentParser.cpp in Sources */,
                                076306D217E1478D005A7C4E /* MediaStreamTrackSourcesRequest.cpp in Sources */,
index b0e3a27..57d04e1 100644 (file)
@@ -42,7 +42,9 @@
 
 #if ENABLE(INDEXED_DATABASE)
 #include "IDBDatabaseMetadata.h"
+#include "IDBGetResult.h"
 #include "IDBKeyData.h"
+#include "IDBKeyRangeData.h"
 #endif
 
 namespace WebCore {
@@ -94,6 +96,11 @@ CrossThreadCopierBase<false, false, IDBDatabaseMetadata>::Type CrossThreadCopier
     return metadata.isolatedCopy();
 }
 
+CrossThreadCopierBase<false, false, IDBGetResult>::Type CrossThreadCopierBase<false, false, IDBGetResult>::copy(const IDBGetResult& result)
+{
+    return result.isolatedCopy();
+}
+
 CrossThreadCopierBase<false, false, IDBIndexMetadata>::Type CrossThreadCopierBase<false, false, IDBIndexMetadata>::copy(const IDBIndexMetadata& metadata)
 {
     return metadata.isolatedCopy();
@@ -104,6 +111,11 @@ CrossThreadCopierBase<false, false, IDBKeyData>::Type CrossThreadCopierBase<fals
     return keyData.isolatedCopy();
 }
 
+CrossThreadCopierBase<false, false, IDBKeyRangeData>::Type CrossThreadCopierBase<false, false, IDBKeyRangeData>::copy(const IDBKeyRangeData& keyRangeData)
+{
+    return keyRangeData.isolatedCopy();
+}
+
 CrossThreadCopierBase<false, false, IDBObjectStoreMetadata>::Type CrossThreadCopierBase<false, false, IDBObjectStoreMetadata>::copy(const IDBObjectStoreMetadata& metadata)
 {
     return metadata.isolatedCopy();
index 032a27c..3f81ca0 100644 (file)
@@ -167,6 +167,12 @@ namespace WebCore {
         static Type copy(const IDBDatabaseMetadata&);
     };
 
+    struct IDBGetResult;
+    template<> struct CrossThreadCopierBase<false, false, IDBGetResult> {
+        typedef IDBGetResult Type;
+        static Type copy(const IDBGetResult&);
+    };
+
     struct IDBIndexMetadata;
     template<> struct CrossThreadCopierBase<false, false, IDBIndexMetadata> {
         typedef IDBIndexMetadata Type;
@@ -179,6 +185,12 @@ namespace WebCore {
         static Type copy(const IDBKeyData&);
     };
 
+    struct IDBKeyRangeData;
+    template<> struct CrossThreadCopierBase<false, false, IDBKeyRangeData> {
+        typedef IDBKeyRangeData Type;
+        static Type copy(const IDBKeyRangeData&);
+    };
+
     struct IDBObjectStoreMetadata;
     template<> struct CrossThreadCopierBase<false, false, IDBObjectStoreMetadata> {
         typedef IDBObjectStoreMetadata Type;
index 73cb6d4..d554235 100644 (file)
@@ -1,3 +1,45 @@
+2014-01-23  Brady Eidson  <beidson@apple.com>
+
+        IDB: Implement cross-thread and IPC plumbing for 'get' support
+        https://bugs.webkit.org/show_bug.cgi?id=127501
+
+        Reviewed by Anders Carlsson.
+
+        Make the WebProcess call out to the DatabaseProcess with a get request, and handle the
+        response from the DatabaseProcess:
+        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
+        (WebKit::WebIDBServerConnection::get):
+        (WebKit::WebIDBServerConnection::didGetRecord):
+        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
+        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
+
+        Get the request from the WebProcess and forward it to the appropriate unique IDB database:
+        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
+        (WebKit::DatabaseProcessIDBConnection::getRecord):
+        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
+        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
+
+        Forward the request to the database thread, and response to the result from that thread:
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
+        (WebKit::UniqueIDBDatabase::getRecord):
+        (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
+        (WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore):
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
+
+        IPC and asynchronous request infrastructure:
+        * Scripts/webkit2/messages.py:
+        (struct_or_class):
+
+        * Shared/AsyncTask.h:
+        (WebKit::createAsyncTask):
+
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder<IDBGetResult>::encode):
+        (IPC::ArgumentCoder<IDBGetResult>::decode):
+        (IPC::ArgumentCoder<IDBKeyRangeData>::encode):
+        (IPC::ArgumentCoder<IDBKeyRangeData>::decode):
+        * Shared/WebCoreArgumentCoders.h:
+
 2014-01-23  Tim Horton  <timothy_horton@apple.com>
 
         PDFPlugin: Use PDFPlugin even if there's an external plugin installed, if it's blocked
index 5f80731..bb5fc7a 100644 (file)
@@ -36,6 +36,7 @@
 #include "WebCoreArgumentCoders.h"
 #include "WebIDBServerConnectionMessages.h"
 #include <WebCore/IDBDatabaseMetadata.h>
+#include <WebCore/IDBServerConnection.h>
 #include <WebCore/IndexedDB.h>
 
 using namespace WebCore;
@@ -188,6 +189,16 @@ void DatabaseProcessIDBConnection::putRecord(uint64_t requestID, int64_t transac
     });
 }
 
+void DatabaseProcessIDBConnection::getRecord(uint64_t requestID, int64_t transactionID, int64_t objectStoreID, int64_t indexID, const IDBKeyRangeData& keyRange, int64_t cursorType)
+{
+    ASSERT(m_uniqueIDBDatabase);
+
+    LOG(IDB, "DatabaseProcess getRecord request ID %llu, object store id %lli", requestID, objectStoreID);
+    RefPtr<DatabaseProcessIDBConnection> connection(this);
+    m_uniqueIDBDatabase->getRecord(IDBTransactionIdentifier(*this, transactionID), objectStoreID, indexID, keyRange, static_cast<IndexedDB::CursorType>(cursorType), [connection, requestID](const IDBGetResult& getResult, uint32_t errorCode, const String& errorMessage) {
+        connection->send(Messages::WebIDBServerConnection::DidGetRecord(requestID, getResult, errorCode, errorMessage));
+    });
+}
 
 IPC::Connection* DatabaseProcessIDBConnection::messageSenderConnection()
 {
index ac21921..36b4c6b 100644 (file)
@@ -36,6 +36,7 @@
 
 namespace WebCore {
 struct IDBKeyData;
+struct IDBKeyRangeData;
 }
 
 namespace WebKit {
@@ -76,6 +77,7 @@ private:
     void createObjectStore(uint64_t requestID, int64_t transactionID, WebCore::IDBObjectStoreMetadata);
     void deleteObjectStore(uint64_t requestID, int64_t transactionID, int64_t objectStoreID);
     void putRecord(uint64_t requestID, int64_t transactionID, int64_t objectStoreID, const WebCore::IDBKeyData&, const IPC::DataReference& value, int64_t putMode, const Vector<int64_t>& indexIDs, const Vector<Vector<WebCore::IDBKeyData>>& indexKeys);
+    void getRecord(uint64_t requestID, int64_t transactionID, int64_t objectStoreID, int64_t indexID, const WebCore::IDBKeyRangeData&, int64_t cursorType);
 
     Ref<DatabaseToWebProcessConnection> m_connection;
     uint64_t m_serverConnectionIdentifier;
index a938411..1513efe 100644 (file)
@@ -36,6 +36,7 @@ messages -> DatabaseProcessIDBConnection LegacyReceiver {
     CreateObjectStore(uint64_t requestID, int64_t transactionID, WebCore::IDBObjectStoreMetadata objectStoreMetadata)
     DeleteObjectStore(uint64_t requestID, int64_t transactionID, int64_t objectStoreID)
     PutRecord(uint64_t requestID, int64_t transactionID, int64_t objectStoreID, WebCore::IDBKeyData key, IPC::DataReference value, int64_t putMode, Vector<int64_t> indexIDs, Vector<Vector<WebCore::IDBKeyData>> indexKeys)
+    GetRecord(uint64_t requestID, int64_t transactionID, int64_t objectStoreID, int64_t indexID, WebCore::IDBKeyRangeData keyRange, int64_t cursorType);
 }
 
 #endif // ENABLE(INDEXED_DATABASE) && ENABLE(DATABASE_PROCESS)
index 83022a0..22b8e56 100644 (file)
@@ -38,7 +38,9 @@
 #include <WebCore/FileSystem.h>
 #include <WebCore/IDBDatabaseBackend.h>
 #include <WebCore/IDBDatabaseMetadata.h>
+#include <WebCore/IDBGetResult.h>
 #include <WebCore/IDBKeyData.h>
+#include <WebCore/IDBKeyRangeData.h>
 #include <wtf/MainThread.h>
 #include <wtf/text/WTFString.h>
 
@@ -416,6 +418,29 @@ void UniqueIDBDatabase::putRecord(const IDBTransactionIdentifier& identifier, in
     postDatabaseTask(createAsyncTask(*this, &UniqueIDBDatabase::putRecordInBackingStore, requestID, identifier, m_metadata->objectStores.get(objectStoreID), keyData, value.vector(), putMode, indexIDs, indexKeys));
 }
 
+void UniqueIDBDatabase::getRecord(const IDBTransactionIdentifier& identifier, int64_t objectStoreID, int64_t indexID, const WebCore::IDBKeyRangeData& keyRangeData, WebCore::IndexedDB::CursorType cursorType, std::function<void(const WebCore::IDBGetResult&, uint32_t, const String&)> callback)
+{
+    ASSERT(isMainThread());
+
+    if (!m_acceptingNewRequests) {
+        callback(IDBGetResult(), INVALID_STATE_ERR, "Unable to get record from database because it has shut down");
+        return;
+    }
+
+    ASSERT(m_metadata->objectStores.contains(objectStoreID));
+
+    RefPtr<AsyncRequest> request = AsyncRequestImpl<const IDBGetResult&, uint32_t, const String&>::create([this, callback](const IDBGetResult& result, uint32_t errorCode, const String& errorMessage) {
+        callback(result, errorCode, errorMessage);
+    }, [this, callback]() {
+        callback(IDBGetResult(), INVALID_STATE_ERR, "Unable to get record from database");
+    });
+
+    uint64_t requestID = request->requestID();
+    m_pendingDatabaseTasks.add(requestID, request.release());
+
+    postDatabaseTask(createAsyncTask(*this, &UniqueIDBDatabase::getRecordFromBackingStore, requestID, identifier, m_metadata->objectStores.get(objectStoreID), indexID, keyRangeData, cursorType));
+}
+
 void UniqueIDBDatabase::openBackingStoreTransaction(const IDBTransactionIdentifier& identifier, const Vector<int64_t>& objectStoreIDs, IndexedDB::TransactionMode mode)
 {
     ASSERT(!isMainThread());
@@ -552,6 +577,21 @@ void UniqueIDBDatabase::didPutRecordInBackingStore(uint64_t requestID, const IDB
     request->completeRequest(keyData, errorCode, errorMessage);
 }
 
+void UniqueIDBDatabase::getRecordFromBackingStore(uint64_t requestID, const IDBTransactionIdentifier&, const WebCore::IDBObjectStoreMetadata&, int64_t indexID, const WebCore::IDBKeyRangeData&, WebCore::IndexedDB::CursorType)
+{
+    // FIXME: Implement (https://bugs.webkit.org/show_bug.cgi?id=127502)
+
+    postMainThreadTask(createAsyncTask(*this, &UniqueIDBDatabase::didGetRecordFromBackingStore, requestID, IDBGetResult(), IDBDatabaseException::UnknownError, ASCIILiteral("'get' support not yet implemented")));
+}
+
+void UniqueIDBDatabase::didGetRecordFromBackingStore(uint64_t requestID, const IDBGetResult& result, uint32_t errorCode, const String& errorMessage)
+{
+    RefPtr<AsyncRequest> request = m_pendingDatabaseTasks.take(requestID);
+    ASSERT(request);
+
+    request->completeRequest(result, errorCode, errorMessage);
+}
+
 String UniqueIDBDatabase::absoluteDatabaseDirectory() const
 {
     ASSERT(isMainThread());
index ba9b55b..95bd5c8 100644 (file)
@@ -78,6 +78,7 @@ public:
     void createObjectStore(const IDBTransactionIdentifier&, const WebCore::IDBObjectStoreMetadata&, std::function<void(bool)> successCallback);
     void deleteObjectStore(const IDBTransactionIdentifier&, int64_t objectStoreID, std::function<void(bool)> successCallback);
     void putRecord(const IDBTransactionIdentifier&, int64_t objectStoreID, const WebCore::IDBKeyData&, const IPC::DataReference& value, int64_t putMode, const Vector<int64_t>& indexIDs, const Vector<Vector<WebCore::IDBKeyData>>& indexKeys, std::function<void(const WebCore::IDBKeyData&, uint32_t, const String&)> callback);
+    void getRecord(const IDBTransactionIdentifier&, int64_t objectStoreID, int64_t indexID, const WebCore::IDBKeyRangeData&, WebCore::IndexedDB::CursorType, std::function<void(const WebCore::IDBGetResult&, uint32_t, const String&)> callback);
 
 private:
     UniqueIDBDatabase(const UniqueIDBDatabaseIdentifier&);
@@ -120,7 +121,7 @@ private:
     void createObjectStoreInBackingStore(uint64_t requestID, const IDBTransactionIdentifier&, const WebCore::IDBObjectStoreMetadata&);
     void deleteObjectStoreInBackingStore(uint64_t requestID, const IDBTransactionIdentifier&, int64_t objectStoreID);
     void putRecordInBackingStore(uint64_t requestID, const IDBTransactionIdentifier&, const WebCore::IDBObjectStoreMetadata&, const WebCore::IDBKeyData&, const Vector<uint8_t>& value, int64_t putMode, const Vector<int64_t>& indexIDs, const Vector<Vector<WebCore::IDBKeyData>>& indexKeys);
-
+    void getRecordFromBackingStore(uint64_t requestID, const IDBTransactionIdentifier&, const WebCore::IDBObjectStoreMetadata&, int64_t indexID, const WebCore::IDBKeyRangeData&, WebCore::IndexedDB::CursorType);
 
     void shutdownBackingStore();
 
@@ -132,6 +133,7 @@ private:
     void didCreateObjectStore(uint64_t requestID, bool success);
     void didDeleteObjectStore(uint64_t requestID, bool success);
     void didPutRecordInBackingStore(uint64_t requestID, const WebCore::IDBKeyData&, uint32_t errorCode, const String& errorMessage);
+    void didGetRecordFromBackingStore(uint64_t requestID, const WebCore::IDBGetResult&, uint32_t errorCode, const String& errorMessage);
     void didShutdownBackingStore();
     void didCompleteBoolRequest(uint64_t requestID, bool success);
 
index 2d6476c..7b80055 100644 (file)
@@ -177,7 +177,9 @@ def struct_or_class(namespace, type):
         'WebCore::FileChooserSettings',
         'WebCore::GrammarDetail',
         'WebCore::IDBDatabaseMetadata',
+        'WebCore::IDBGetResult',
         'WebCore::IDBKeyData',
+        'WebCore::IDBKeyRangeData',
         'WebCore::IDBObjectStoreMetadata',
         'WebCore::IdentityTransformOperation',
         'WebCore::KeypressCommand',
index bedd8c1..b894e6f 100644 (file)
@@ -134,6 +134,28 @@ std::unique_ptr<AsyncTask> createAsyncTask(
         WebCore::CrossThreadCopier<P4>::copy(parameter4));
 }
 
+template<typename T, typename P1, typename MP1, typename P2, typename MP2, typename P3, typename MP3, typename P4, typename MP4, typename P5, typename MP5, typename P6, typename MP6>
+std::unique_ptr<AsyncTask> createAsyncTask(
+    T& callee,
+    void (T::*method)(MP1, MP2, MP3, MP4, MP5, MP6),
+    const P1& parameter1,
+    const P2& parameter2,
+    const P3& parameter3,
+    const P4& parameter4,
+    const P5& parameter5,
+    const P6& parameter6)
+{
+    return std::make_unique<AsyncTaskImpl<T, MP1, MP2, MP3, MP4, MP5, MP6>>(
+        &callee,
+        method,
+        WebCore::CrossThreadCopier<P1>::copy(parameter1),
+        WebCore::CrossThreadCopier<P2>::copy(parameter2),
+        WebCore::CrossThreadCopier<P3>::copy(parameter3),
+        WebCore::CrossThreadCopier<P4>::copy(parameter4),
+        WebCore::CrossThreadCopier<P5>::copy(parameter5),
+        WebCore::CrossThreadCopier<P6>::copy(parameter6));
+}
+
 template<typename T, typename P1, typename MP1, typename P2, typename MP2, typename P3, typename MP3, typename P4, typename MP4, typename P5, typename MP5, typename P6, typename MP6, typename P7, typename MP7, typename P8, typename MP8>
 std::unique_ptr<AsyncTask> createAsyncTask(
     T& callee,
index 6fbf844..ebd2ecc 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "WebCoreArgumentCoders.h"
 
+#include "DataReference.h"
 #include "ShareableBitmap.h"
 #include <WebCore/AuthenticationChallenge.h>
 #include <WebCore/CertificateInfo.h>
 #include <WebCore/GraphicsContext.h>
 #include <WebCore/GraphicsLayer.h>
 #include <WebCore/IDBDatabaseMetadata.h>
+#include <WebCore/IDBGetResult.h>
 #include <WebCore/IDBKeyData.h>
 #include <WebCore/IDBKeyPath.h>
+#include <WebCore/IDBKeyRangeData.h>
 #include <WebCore/Image.h>
 #include <WebCore/Length.h>
 #include <WebCore/PluginData.h>
@@ -1623,6 +1626,42 @@ bool ArgumentCoder<IDBIndexMetadata>::decode(ArgumentDecoder& decoder, IDBIndexM
     return true;
 }
 
+void ArgumentCoder<IDBGetResult>::encode(ArgumentEncoder& encoder, const IDBGetResult& result)
+{
+    bool nullData = !result.valueBuffer;
+    encoder << nullData;
+
+    if (!nullData)
+        encoder << DataReference(reinterpret_cast<const uint8_t*>(result.valueBuffer->data()), result.valueBuffer->size());
+
+    encoder << result.keyData << result.keyPath;
+}
+
+bool ArgumentCoder<IDBGetResult>::decode(ArgumentDecoder& decoder, IDBGetResult& result)
+{
+    bool nullData;
+    if (!decoder.decode(nullData))
+        return false;
+
+    if (nullData)
+        result.valueBuffer = nullptr;
+    else {
+        DataReference data;
+        if (!decoder.decode(data))
+            return false;
+
+        result.valueBuffer = SharedBuffer::create(data.data(), data.size());
+    }
+
+    if (!decoder.decode(result.keyData))
+        return false;
+
+    if (!decoder.decode(result.keyPath))
+        return false;
+
+    return true;
+}
+
 void ArgumentCoder<IDBKeyData>::encode(ArgumentEncoder& encoder, const IDBKeyData& keyData)
 {
     encoder << keyData.isNull;
@@ -1735,6 +1774,38 @@ bool ArgumentCoder<IDBKeyPath>::decode(ArgumentDecoder& decoder, IDBKeyPath& key
     }
 }
 
+void ArgumentCoder<IDBKeyRangeData>::encode(ArgumentEncoder& encoder, const IDBKeyRangeData& keyRange)
+{
+    encoder << keyRange.isNull;
+    if (keyRange.isNull)
+        return;
+
+    encoder << keyRange.upperKey << keyRange.lowerKey << keyRange.upperOpen << keyRange.lowerOpen;
+}
+
+bool ArgumentCoder<IDBKeyRangeData>::decode(ArgumentDecoder& decoder, IDBKeyRangeData& keyRange)
+{
+    if (!decoder.decode(keyRange.isNull))
+        return false;
+
+    if (keyRange.isNull)
+        return true;
+
+    if (!decoder.decode(keyRange.upperKey))
+        return false;
+
+    if (!decoder.decode(keyRange.lowerKey))
+        return false;
+
+    if (!decoder.decode(keyRange.upperOpen))
+        return false;
+
+    if (!decoder.decode(keyRange.lowerOpen))
+        return false;
+
+    return true;
+}
+
 void ArgumentCoder<IDBObjectStoreMetadata>::encode(ArgumentEncoder& encoder, const IDBObjectStoreMetadata& metadata)
 {
     encoder << metadata.name << metadata.id << metadata.keyPath << metadata.autoIncrement << metadata.maxIndexId << metadata.indexes;
index 573f244..a256e3b 100644 (file)
@@ -65,8 +65,10 @@ struct DictationAlternative;
 struct DragSession;
 struct FileChooserSettings;
 struct IDBDatabaseMetadata;
+struct IDBGetResult;
 struct IDBIndexMetadata;
 struct IDBKeyData;
+struct IDBKeyRangeData;
 struct IDBObjectStoreMetadata;
 struct Length;
 struct GrammarDetail;
@@ -360,6 +362,11 @@ template<> struct ArgumentCoder<WebCore::IDBDatabaseMetadata> {
     static bool decode(ArgumentDecoder&, WebCore::IDBDatabaseMetadata&);
 };
 
+template<> struct ArgumentCoder<WebCore::IDBGetResult> {
+    static void encode(ArgumentEncoder&, const WebCore::IDBGetResult&);
+    static bool decode(ArgumentDecoder&, WebCore::IDBGetResult&);
+};
+
 template<> struct ArgumentCoder<WebCore::IDBIndexMetadata> {
     static void encode(ArgumentEncoder&, const WebCore::IDBIndexMetadata&);
     static bool decode(ArgumentDecoder&, WebCore::IDBIndexMetadata&);
@@ -375,6 +382,11 @@ template<> struct ArgumentCoder<WebCore::IDBKeyPath> {
     static bool decode(ArgumentDecoder&, WebCore::IDBKeyPath&);
 };
 
+template<> struct ArgumentCoder<WebCore::IDBKeyRangeData> {
+    static void encode(ArgumentEncoder&, const WebCore::IDBKeyRangeData&);
+    static bool decode(ArgumentDecoder&, WebCore::IDBKeyRangeData&);
+};
+
 template<> struct ArgumentCoder<WebCore::IDBObjectStoreMetadata> {
     static void encode(ArgumentEncoder&, const WebCore::IDBObjectStoreMetadata&);
     static bool decode(ArgumentDecoder&, WebCore::IDBObjectStoreMetadata&);
index f909cdd..eab4347 100644 (file)
@@ -38,6 +38,7 @@
 #include "WebProcess.h"
 #include "WebToDatabaseProcessConnection.h"
 #include <WebCore/IDBDatabaseMetadata.h>
+#include <WebCore/IDBKeyRangeData.h>
 #include <WebCore/SecurityOrigin.h>
 
 using namespace WebCore;
@@ -297,8 +298,23 @@ void WebIDBServerConnection::deleteIndex(IDBTransactionBackend&, const DeleteInd
 {
 }
 
-void WebIDBServerConnection::get(IDBTransactionBackend&, const GetOperation&, std::function<void(const IDBGetResult&, PassRefPtr<IDBDatabaseError>)> completionCallback)
+void WebIDBServerConnection::get(IDBTransactionBackend& transaction, const GetOperation& operation, std::function<void(const IDBGetResult&, PassRefPtr<IDBDatabaseError>)> completionCallback)
 {
+    RefPtr<AsyncRequest> serverRequest = AsyncRequestImpl<const IDBGetResult&, PassRefPtr<IDBDatabaseError>>::create(completionCallback);
+
+    serverRequest->setAbortHandler([completionCallback]() {
+        completionCallback(IDBGetResult(), IDBDatabaseError::create(IDBDatabaseException::UnknownError, "Unknown error occured getting record"));
+    });
+
+    uint64_t requestID = serverRequest->requestID();
+    ASSERT(!m_serverRequests.contains(requestID));
+    m_serverRequests.add(requestID, serverRequest.release());
+
+    LOG(IDB, "WebProcess get request ID %llu", requestID);
+
+    ASSERT(operation.keyRange());
+
+    send(Messages::DatabaseProcessIDBConnection::GetRecord(requestID, transaction.id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), static_cast<int64_t>(operation.cursorType())));
 }
 
 void WebIDBServerConnection::put(IDBTransactionBackend& transaction, const PutOperation& operation, std::function<void(PassRefPtr<IDBKey>, PassRefPtr<IDBDatabaseError>)> completionCallback)
@@ -342,6 +358,18 @@ void WebIDBServerConnection::didPutRecord(uint64_t requestID, const WebCore::IDB
     serverRequest->completeRequest(resultKey.isNull ? nullptr : resultKey.maybeCreateIDBKey(), errorCode ? IDBDatabaseError::create(errorCode, errorMessage) : nullptr);
 }
 
+void WebIDBServerConnection::didGetRecord(uint64_t requestID, const WebCore::IDBGetResult& getResult, uint32_t errorCode, const String& errorMessage)
+{
+    LOG(IDB, "WebProcess didGetRecord request ID %llu (error - %s)", requestID, errorMessage.utf8().data());
+
+    RefPtr<AsyncRequest> serverRequest = m_serverRequests.take(requestID);
+
+    if (!serverRequest)
+        return;
+
+    serverRequest->completeRequest(getResult, errorCode ? IDBDatabaseError::create(errorCode, errorMessage) : nullptr);
+}
+
 void WebIDBServerConnection::openCursor(IDBTransactionBackend&, const OpenCursorOperation&, std::function<void(PassRefPtr<IDBDatabaseError>)> completionCallback)
 {
 }
index 69a543e..44da4c3 100644 (file)
@@ -107,6 +107,7 @@ private:
     void didCreateObjectStore(uint64_t requestID, bool success);
     void didDeleteObjectStore(uint64_t requestID, bool success);
     void didPutRecord(uint64_t requestID, const WebCore::IDBKeyData&, uint32_t errorCode, const String& errorMessage);
+    void didGetRecord(uint64_t requestID, const WebCore::IDBGetResult&, uint32_t errorCode, const String& errorMessage);
 
     uint64_t m_serverConnectionIdentifier;
 
index b0ba108..b9f88b9 100644 (file)
@@ -35,6 +35,7 @@ messages -> WebIDBServerConnection LegacyReceiver {
     DidCreateObjectStore(uint64_t requestID, bool success)
     DidDeleteObjectStore(uint64_t requestID, bool success)
     DidPutRecord(uint64_t requestID, WebCore::IDBKeyData resultKey, uint32_t errorCode, String errorMessage)
+    DidGetRecord(uint64_t requestID, WebCore::IDBGetResult getResult, uint32_t errorCode, String errorMessage)
 }
 
 #endif // ENABLE(INDEXED_DATABASE) && ENABLE(DATABASE_PROCESS)