• 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
..
QTMovieWin Loading commit data...
MigrateScripts Loading commit data...
WebCore.make Loading commit data...
WebCore.submit.sln Loading commit data...
WebCore.vcxproj Loading commit data...
WebCore.vcxproj.filters Loading commit data...
WebCoreCFNetwork.props Loading commit data...
WebCoreCG.props Loading commit data...
WebCoreCURL.props Loading commit data...
WebCoreCairo.props Loading commit data...
WebCoreCommon.props Loading commit data...
WebCoreDebug.props Loading commit data...
WebCoreDebugWinCairo.props Loading commit data...
WebCoreGenerated.make Loading commit data...
WebCoreGenerated.vcxproj Loading commit data...
WebCoreGenerated.vcxproj.filters Loading commit data...
WebCoreGeneratedCommon.props Loading commit data...
WebCoreGeneratedDebug.props Loading commit data...
WebCoreGeneratedDebugWinCairo.props Loading commit data...
WebCoreGeneratedProduction.props Loading commit data...
WebCoreGeneratedRelease.props Loading commit data...
WebCoreGeneratedReleaseWinCairo.props Loading commit data...
WebCoreGeneratedWinCairo.make Loading commit data...
WebCoreGeneratedWinCairoCommon.props Loading commit data...
WebCoreMediaQT.props Loading commit data...
WebCorePostBuild.cmd Loading commit data...
WebCorePreBuild.cmd Loading commit data...
WebCoreProduction.props Loading commit data...
WebCoreQuartzCore.props Loading commit data...
WebCoreRelease.props Loading commit data...
WebCoreReleaseWinCairo.props Loading commit data...
WebCoreTestSupport.vcxproj Loading commit data...
WebCoreTestSupport.vcxproj.filters Loading commit data...
build-generated-files.sh Loading commit data...
copyForwardingHeaders.cmd Loading commit data...
copyWebCoreResourceFiles.cmd Loading commit data...
migrate-scripts.sh Loading commit data...
xcopy.excludes Loading commit data...