• beidson@apple.com's avatar
    IDB: "Put" support · 0f1c94b6
    beidson@apple.com authored
    <rdar://problem/15779643> and https://bugs.webkit.org/show_bug.cgi?id=127401
    
    Reviewed by Alexey Proskuryakov.
    
    Source/WebCore:
    
    Add persistent encode/decode for storage to the database:
    * Modules/indexeddb/IDBKey.cpp:
    (WebCore::IDBKey::encode):
    (WebCore::IDBKey::decode):
    * Modules/indexeddb/IDBKey.h:
    
    Add a data class to represent IDBKey suitable for crossing IPC:
    * Modules/indexeddb/IDBKeyData.cpp: Added.
    (WebCore::IDBKeyData::IDBKeyData):
    (WebCore::IDBKeyData::maybeCreateIDBKey):
    (WebCore::IDBKeyData::isolatedCopy):
    * Modules/indexeddb/IDBKeyData.h: Added.
    (WebCore::IDBKeyData::IDBKeyData):
    
    * platform/CrossThreadCopier.cpp:
    (WebCore::IDBKeyData>::copy):
    * platform/CrossThreadCopier.h:
    
    * WebCore.exp.in:
    * WebCore.xcodeproj/project.pbxproj:
    
    Source/WebKit2:
    
    Ship putRecord requests over to the DatabaseProcess, and listen for completion from the DatabaseProcess:
    * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
    (WebKit::WebIDBServerConnection::put):
    (WebKit::WebIDBServerConnection::didPutRecord):
    * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
    * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
    
    Pass off the putRecord request to the Unique IDBDatabase:
    * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
    (WebKit::DatabaseProcessIDBConnection::putRecord):
    * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
    * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
    
    Pass off the putRecord request to the backing store:
    * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
    (WebKit::UniqueIDBDatabase::putRecord):
    (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
    (WebKit::UniqueIDBDatabase::didPutRecordInBackingStore):
    * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
    
    Add backing store methods related to putRecord, though only one is critical right now:
    * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
    * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
    (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
    (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKey):
    (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
    (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
    (WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGenerator):
    * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
    
    Add the IDBKeyData type to IPC:
    * Scripts/webkit2/messages.py:
    (struct_or_class):
    
    * Shared/WebCoreArgumentCoders.cpp:
    (IPC::ArgumentCoder<IDBKeyData>::encode):
    (IPC::ArgumentCoder<IDBKeyData>::decode):
    * Shared/WebCoreArgumentCoders.h:
    
    * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
    (WebKit::serializeIDBKey):
    * DatabaseProcess/IndexedDB/IDBSerialization.h:
    
    Implement more cross-thread copying:
    * Shared/WebCrossThreadCopier.cpp:
    (WebCore::Vector<uint8_t>>::copy):
    (WebCore::Vector<Vector<IDBKeyData>>>::copy):
    (WebCore::ASCIILiteral>::copy):
    * Shared/WebCrossThreadCopier.h:
    
    Implement more numbers of generic AsyncTask templates:
    * Shared/AsyncTask.h:
    (WebKit::createAsyncTask):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    0f1c94b6
Name
Last commit
Last update
Examples Loading commit data...
LayoutTests Loading commit data...
ManualTests Loading commit data...
PerformanceTests Loading commit data...
Source Loading commit data...
Tools Loading commit data...
WebKit.xcworkspace Loading commit data...
WebKitLibraries Loading commit data...
Websites Loading commit data...
.dir-locals.el Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
CMakeLists.txt Loading commit data...
ChangeLog Loading commit data...
ChangeLog-2012-05-22 Loading commit data...
GNUmakefile.am Loading commit data...
Makefile Loading commit data...
Makefile.shared Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...