1. 08 Nov, 2013 1 commit
    • beidson@apple.com's avatar
      Merge IDBCursorBackendInterface and IDBCursorBackendImpl · 96d115ed
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124068
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBCursorBackendInterface.h: Removed.
      
      * Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
      * Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
      
      * Modules/indexeddb/IDBCallbacks.h:
      * Modules/indexeddb/IDBCursor.cpp:
      * Modules/indexeddb/IDBCursor.h:
      * Modules/indexeddb/IDBCursorWithValue.cpp:
      * Modules/indexeddb/IDBCursorWithValue.h:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      * Modules/indexeddb/IDBRequest.cpp:
      * Modules/indexeddb/IDBRequest.h:
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::createCursorBackend):
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      96d115ed
  2. 05 Nov, 2013 1 commit
    • beidson@apple.com's avatar
      IDB: Split backend Cursors and Transactions into their own files · fedb605d
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123789
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      No new tests (Rename, no change in behavior).
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBBackingStoreCursorInterface.h:
      (WebCore::IDBBackingStoreCursorInterface::~IDBBackingStoreCursorInterface):
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      
      * Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Added.
      (WebCore::IDBBackingStoreTransactionInterface::~IDBBackingStoreTransactionInterface):
      
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::create):
      
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      
      * Modules/indexeddb/IDBIndexWriter.cpp:
      (WebCore::IDBIndexWriter::writeIndexKeys):
      (WebCore::IDBIndexWriter::verifyIndexKeys):
      (WebCore::IDBIndexWriter::addingKeyAllowed):
      * Modules/indexeddb/IDBIndexWriter.h:
      
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::createCursorBackend):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      (WebCore::GetOperation::perform):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::CountOperation::perform):
      (WebCore::DeleteRangeOperation::perform):
      
      * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Added.
      (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
      (WebCore::IDBBackingStoreCursorLevelDB::firstSeek):
      (WebCore::IDBBackingStoreCursorLevelDB::advance):
      (WebCore::IDBBackingStoreCursorLevelDB::continueFunction):
      (WebCore::IDBBackingStoreCursorLevelDB::haveEnteredRange):
      (WebCore::IDBBackingStoreCursorLevelDB::isPastBounds):
      * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Added.
      (WebCore::IDBBackingStoreCursorLevelDB::~IDBBackingStoreCursorLevelDB):
      (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::compareIndexKeys):
      (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
      (WebCore::IDBBackingStoreLevelDB::createObjectStore):
      (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
      (WebCore::IDBBackingStoreLevelDB::getRecord):
      (WebCore::IDBBackingStoreLevelDB::putRecord):
      (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
      (WebCore::IDBBackingStoreLevelDB::deleteRecord):
      (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
      (WebCore::IDBBackingStoreLevelDB::createIndex):
      (WebCore::IDBBackingStoreLevelDB::deleteIndex):
      (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
      (WebCore::findGreatestKeyLessThanOrEqual):
      (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
      (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
      (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
      (WebCore::ObjectStoreKeyCursorImpl::create):
      (WebCore::ObjectStoreKeyCursorImpl::clone):
      (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
      (WebCore::ObjectStoreCursorImpl::create):
      (WebCore::ObjectStoreCursorImpl::clone):
      (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
      (WebCore::objectStoreCursorOptions):
      (WebCore::indexCursorOptions):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
      (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      
             * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Added.
      (WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
      (WebCore::IDBBackingStoreTransactionLevelDB::begin):
      (WebCore::IDBBackingStoreTransactionLevelDB::commit):
      (WebCore::IDBBackingStoreTransactionLevelDB::rollback):
      * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      (WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::createCursorBackend):
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fedb605d
  3. 29 Oct, 2013 4 commits
    • beidson@apple.com's avatar
      IDBTransactionBackend should be cross platform · 473bac21
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123449
      
      Reviewed by Beth Dakin.
      
      - Rename IDBTransactionBackendLevelDB to IDBTransactionBackendImpl
      - Rename IDBTransactionBackendLevelDBOperations to IDBTransactionBackendOperations
      - Move their files from the leveldb subdirectory to the indexeddb directory
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp.
      * Modules/indexeddb/IDBTransactionBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h.
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp.
      * Modules/indexeddb/IDBTransactionBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h.
      
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      (WebCore::IDBFactoryBackendLevelDB::maybeCreateTransactionBackend):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      473bac21
    • beidson@apple.com's avatar
      Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface · 607bfd2f
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123483
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * Modules/indexeddb/IDBCursorBackendInterface.h:
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
      (WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
      (WebCore::IDBCursorBackendLevelDB::create):
      
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      (WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      (WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
      (WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
      (WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
      (WebCore::IDBTransactionBackendLevelDB::createCursorBackend):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
      
      * WebCore.xcodeproj/project.pbxproj: Export a required header.
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::createCursorBackend): Stubbed out.
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
      (WebKit::WebProcessIDBDatabaseBackend::factoryBackend): Stubbed out.
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      607bfd2f
    • beidson@apple.com's avatar
      Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface::Transaction. · 8dfcf408
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123475
      
      Reviewed by Tim Horton.
      
      Currently it's using IDBBackingStoreLevelDB::Transaction, which hinders the goal of:
      https://bugs.webkit.org/show_bug.cgi?id=123449 - IDBTransactionBackend should be cross platform
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      
      * Modules/indexeddb/IDBIndexWriter.cpp:
      (WebCore::IDBIndexWriter::writeIndexKeys):
      (WebCore::IDBIndexWriter::verifyIndexKeys):
      (WebCore::IDBIndexWriter::addingKeyAllowed):
      * Modules/indexeddb/IDBIndexWriter.h:
      
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseIntVersion):
      (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseMetaData):
      (WebCore::IDBBackingStoreLevelDB::createObjectStore):
      (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
      (WebCore::IDBBackingStoreLevelDB::getRecord):
      (WebCore::IDBBackingStoreLevelDB::putRecord):
      (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
      (WebCore::IDBBackingStoreLevelDB::deleteRecord):
      (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
      (WebCore::IDBBackingStoreLevelDB::createIndex):
      (WebCore::IDBBackingStoreLevelDB::deleteIndex):
      (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
      (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
      (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
      (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
      (WebCore::IDBTransactionBackendLevelDB::abort):
      (WebCore::IDBTransactionBackendLevelDB::commit):
      (WebCore::IDBTransactionBackendLevelDB::taskTimerFired):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8dfcf408
    • beidson@apple.com's avatar
      Get IDBTransactionBackendLevelDBOperations *almost* ready to go cross platform. · aa0f11ea
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123451
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      This involves:
      - Splitting out IDBTransactionBackendLevelDB::Operation into its own header
      - Splitting out IDBDatabaseBackendImpl::PendingOpenCall into its own header
      - Reworking the LevelDB Operations to handle the base class IDBTransactionBackendInterface
      - Adding virtual methods in a few of the *Interface classes to support the above
      
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBCallbacks.h:
      
      * Modules/indexeddb/IDBCursorBackendInterface.h:
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
      (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
      (WebCore::IDBDatabaseBackendImpl::openConnection):
      (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      
      * Modules/indexeddb/IDBOperation.h: Added.
      (WebCore::IDBOperation::~IDBOperation):
      
      * Modules/indexeddb/IDBPendingOpenCall.h: Added.
      (WebCore::IDBPendingOpenCall::create):
      (WebCore::IDBPendingOpenCall::callbacks):
      (WebCore::IDBPendingOpenCall::databaseCallbacks):
      (WebCore::IDBPendingOpenCall::version):
      (WebCore::IDBPendingOpenCall::transactionId):
      (WebCore::IDBPendingOpenCall::IDBPendingOpenCall):
      
      * Modules/indexeddb/IDBRequest.h:
      
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
      (WebCore::IDBCursorBackendLevelDB::CursorIterationOperation::create):
      (WebCore::IDBCursorBackendLevelDB::CursorAdvanceOperation::create):
      (WebCore::IDBCursorBackendLevelDB::CursorPrefetchIterationOperation::create):
      (WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      (WebCore::IDBTransactionBackendLevelDB::scheduleTask):
      (WebCore::IDBTransactionBackendLevelDB::abort):
      (WebCore::IDBTransactionBackendLevelDB::taskTimerFired):
      (WebCore::IDBTransactionBackendLevelDB::schedulePutOperation):
      (WebCore::IDBTransactionBackendLevelDB::scheduleOpenCursorOperation):
      (WebCore::IDBTransactionBackendLevelDB::scheduleCountOperation):
      (WebCore::IDBTransactionBackendLevelDB::scheduleDeleteRangeOperation):
      (WebCore::IDBTransactionBackendLevelDB::scheduleClearOperation):
      (WebCore::IDBTransactionBackendLevelDB::createCursorBackend):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
      (WebCore::CreateObjectStoreOperation::perform):
      (WebCore::CreateIndexOperation::perform):
      (WebCore::CreateIndexAbortOperation::perform):
      (WebCore::DeleteIndexOperation::perform):
      (WebCore::DeleteIndexAbortOperation::perform):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
      (WebCore::CreateObjectStoreAbortOperation::perform):
      (WebCore::DeleteObjectStoreAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
      (WebCore::CreateObjectStoreOperation::create):
      (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
      (WebCore::DeleteObjectStoreOperation::create):
      (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
      (WebCore::CreateObjectStoreAbortOperation::create):
      (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
      (WebCore::DeleteObjectStoreAbortOperation::create):
      (WebCore::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::VersionChangeAbortOperation):
      (WebCore::CreateIndexOperation::create):
      (WebCore::CreateIndexOperation::CreateIndexOperation):
      (WebCore::CreateIndexAbortOperation::create):
      (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
      (WebCore::DeleteIndexOperation::create):
      (WebCore::DeleteIndexOperation::DeleteIndexOperation):
      (WebCore::DeleteIndexAbortOperation::create):
      (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
      (WebCore::GetOperation::create):
      (WebCore::GetOperation::GetOperation):
      (WebCore::PutOperation::create):
      (WebCore::PutOperation::PutOperation):
      (WebCore::SetIndexesReadyOperation::create):
      (WebCore::SetIndexesReadyOperation::SetIndexesReadyOperation):
      (WebCore::OpenCursorOperation::create):
      (WebCore::OpenCursorOperation::OpenCursorOperation):
      (WebCore::CountOperation::create):
      (WebCore::CountOperation::CountOperation):
      (WebCore::DeleteRangeOperation::create):
      (WebCore::DeleteRangeOperation::DeleteRangeOperation):
      (WebCore::ClearOperation::create):
      (WebCore::ClearOperation::ClearOperation):
      
      Source/WebKit2:
      
      Stub out more pure virtual methods.
      
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
      (WebKit::WebProcessIDBDatabaseBackend::backingStore):
      (WebKit::WebProcessIDBDatabaseBackend::id):
      (WebKit::WebProcessIDBDatabaseBackend::addObjectStore):
      (WebKit::WebProcessIDBDatabaseBackend::removeObjectStore):
      (WebKit::WebProcessIDBDatabaseBackend::addIndex):
      (WebKit::WebProcessIDBDatabaseBackend::removeIndex):
      (WebKit::WebProcessIDBDatabaseBackend::metadata):
      (WebKit::WebProcessIDBDatabaseBackend::setCurrentVersion):
      (WebKit::WebProcessIDBDatabaseBackend::hasPendingSecondHalfOpen):
      (WebKit::WebProcessIDBDatabaseBackend::setPendingSecondHalfOpen):
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa0f11ea
  4. 23 Oct, 2013 1 commit
    • beidson@apple.com's avatar
      Make IDBDatabaseBackendLevelDB.cpp be cross platform · 729687b4
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123027
      
      Attentively reviewed by Dean Jackson.
      
      Source/WebCore:
      
      Move it out of the indexeddb/leveldb directory, and rename it to IDBDatabaseBackendImpl.
      
      Project files:
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp.
      * Modules/indexeddb/IDBDatabaseBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h.
      
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      (WebCore::IDBDatabaseBackendInterface::isIDBDatabaseBackendImpl): Add to support a required cast in LevelDB code.
      
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
      (WebCore::IDBFactoryBackendLevelDB::open):
      (WebCore::IDBFactoryBackendLevelDB::maybeCreateTransactionBackend):
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
      * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      (WebCore::IDBTransactionBackendLevelDB::create):
      (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
      (WebCore::IDBTransactionBackendLevelDB::scheduleVersionChangeOperation):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::maybeCreateTransactionBackend):
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      729687b4
  5. 22 Oct, 2013 1 commit
    • beidson@apple.com's avatar
      Get rid of IDBObjectStoreBackendLevelDB · 17a77627
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123174
      
      Reviewed by Tim Horton.
      
      Source/WebCore:
      
      This file was kind of a dumping ground.
      Its contents can be merged into IDBBackingStoreInterface and a new IDBIndexWriter class.
      
      Also took the opportunity to do a little bit of RefPtr<> and pointer-vs-reference cleanup.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Removed.
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: Removed.
      
      * Modules/indexeddb/IDBIndexWriter.cpp: Added.
      (WebCore::IDBIndexWriter::IDBIndexWriter):
      (WebCore::IDBIndexWriter::writeIndexKeys):
      (WebCore::IDBIndexWriter::verifyIndexKeys):
      (WebCore::IDBIndexWriter::addingKeyAllowed):
      * Modules/indexeddb/IDBIndexWriter.h: Added.
      (WebCore::IDBIndexWriter::create):
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      
      * Modules/indexeddb/IDBMetadata.h:
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
      (WebCore::IDBBackingStoreLevelDB::generateKey):
      (WebCore::IDBBackingStoreLevelDB::updateKeyGenerator):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
      (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
      (WebCore::IDBDatabaseBackendLevelDB::setIndexesReady):
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      (WebCore::IDBTransactionBackendLevelDB::schedulePutOperation):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
      (WebCore::PutOperation::perform):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
      (WebCore::PutOperation::create):
      (WebCore::PutOperation::PutOperation):
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      17a77627
  6. 21 Oct, 2013 2 commits
    • beidson@apple.com's avatar
      Make IDBTransactionCoordinatorLevelDB cross platform · 167e177f
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123124
      
      Enthusiastically reviewed by Tim Horton.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      Make more methods pure virtual in the interface:
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
      
      Update the name of the class, and use IDBTransactionBackendInterface instead of IDBTransactionBackendLeveDB:
      * Modules/indexeddb/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp.
      (WebCore::IDBTransactionCoordinator::create):
      (WebCore::IDBTransactionCoordinator::IDBTransactionCoordinator):
      (WebCore::IDBTransactionCoordinator::~IDBTransactionCoordinator):
      (WebCore::IDBTransactionCoordinator::didCreateTransaction):
      (WebCore::IDBTransactionCoordinator::didStartTransaction):
      (WebCore::IDBTransactionCoordinator::didFinishTransaction):
      (WebCore::IDBTransactionCoordinator::isActive):
      (WebCore::IDBTransactionCoordinator::processStartedTransactions):
      (WebCore::doScopesOverlap):
      (WebCore::IDBTransactionCoordinator::canRunTransaction):
      * Modules/indexeddb/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h.
      
      Update the name of the class elsewhere:
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
      (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
      (WebCore::IDBDatabaseBackendLevelDB::transactionCoordinator):
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      167e177f
    • beidson@apple.com's avatar
      Transition most use of IDBBackingStoreLevelDB to IDBBackingStoreInterface · 5b448867
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123105
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      Export more required headers:
      * WebCore.xcodeproj/project.pbxproj:
      
      Flesh out many of the pure virtual methods on IDBBackingStoreInterface, as well as
      the RecordIdentifier and Cursor classes:
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      (WebCore::IDBBackingStoreInterface::RecordIdentifier::~RecordIdentifier):
      (WebCore::IDBBackingStoreInterface::Cursor::~Cursor):
      
      Use IDBBackingStoreInterface, IDBBackingStoreInterface::RecordIdentifier, and
      IDBBackingStoreInterface::Cursor wherever possible:
      
      * Modules/indexeddb/IDBFactoryBackendInterface.cpp:
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::putRecord):
      (WebCore::IDBBackingStoreLevelDB::deleteRecord):
      (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
      (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
      (WebCore::ObjectStoreKeyCursorImpl::clone):
      (WebCore::ObjectStoreCursorImpl::clone):
      (WebCore::IndexKeyCursorImpl::clone):
      (WebCore::IndexCursorImpl::clone):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
      (WebCore::IDBBackingStoreLevelDB::Transaction::Transaction):
      (WebCore::IDBBackingStoreLevelDB::Transaction::begin):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      (WebCore::IDBBackingStoreLevelDB::RecordIdentifier::RecordIdentifier):
      
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
      (WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
      
      (WebCore::IDBCursorBackendLevelDB::create):
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
      (WebCore::IDBDatabaseBackendLevelDB::create):
      (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
      (WebCore::IDBDatabaseBackendLevelDB::backingStore):
      (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
      (WebCore::IDBDatabaseBackendLevelDB::createTransaction):
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      (WebCore::IDBFactoryBackendLevelDB::createTransactionBackend):
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
      (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys):
      (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
      (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed):
      (WebCore::IDBObjectStoreBackendLevelDB::makeIndexWriters):
      (WebCore::IDBObjectStoreBackendLevelDB::generateKey):
      (WebCore::IDBObjectStoreBackendLevelDB::updateKeyGenerator):
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      (WebCore::IDBTransactionBackendLevelDB::create):
      (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
      (WebCore::GetOperation::perform):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::CountOperation::perform):
      (WebCore::DeleteRangeOperation::perform):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
      (WebCore::CreateObjectStoreOperation::create):
      (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
      (WebCore::DeleteObjectStoreOperation::create):
      (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
      (WebCore::CreateIndexOperation::create):
      (WebCore::CreateIndexOperation::CreateIndexOperation):
      (WebCore::DeleteIndexOperation::create):
      (WebCore::DeleteIndexOperation::DeleteIndexOperation):
      (WebCore::GetOperation::create):
      (WebCore::GetOperation::GetOperation):
      (WebCore::PutOperation::create):
      (WebCore::PutOperation::PutOperation):
      (WebCore::OpenCursorOperation::create):
      (WebCore::OpenCursorOperation::OpenCursorOperation):
      (WebCore::CountOperation::create):
      (WebCore::CountOperation::CountOperation):
      (WebCore::DeleteRangeOperation::create):
      (WebCore::DeleteRangeOperation::DeleteRangeOperation):
      (WebCore::ClearOperation::create):
      (WebCore::ClearOperation::ClearOperation):
      
      Source/WebKit2:
      
      Stub out a new pure virtual method:
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::createTransactionBackend):
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b448867
  7. 19 Oct, 2013 1 commit
    • beidson@apple.com's avatar
      Global rename of the class "IDBBackingStore" to "IDBBackingStoreLevelDB" · 76187227
      beidson@apple.com authored
      Rubberstamped by Anders Carlsson (And Andreas Kling wanted to, but he wasn’t around)
      
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76187227
  8. 18 Oct, 2013 2 commits
    • beidson@apple.com's avatar
      Get rid of IDBFactoryBackendLevelDB and IDBTransactionBackendLevelDB in IDBDatabaseBackendLevelDB. · 7a1fc575
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123039
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      Add a few concepts to the interfaces to make this work:
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      (WebCore::IDBTransactionBackendInterface::id):
      (WebCore::IDBTransactionBackendInterface::IDBTransactionBackendInterface):
      
      Adapt to using Interface ptr’s instead of LevelDB ptr’s:
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
      (WebCore::IDBDatabaseBackendLevelDB::create):
      (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
      (WebCore::IDBDatabaseBackendLevelDB::createObjectStore):
      (WebCore::IDBDatabaseBackendLevelDB::deleteObjectStore):
      (WebCore::IDBDatabaseBackendLevelDB::createIndex):
      (WebCore::IDBDatabaseBackendLevelDB::deleteIndex):
      (WebCore::IDBDatabaseBackendLevelDB::get):
      (WebCore::IDBDatabaseBackendLevelDB::put):
      (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
      (WebCore::IDBDatabaseBackendLevelDB::setIndexesReady):
      (WebCore::IDBDatabaseBackendLevelDB::openCursor):
      (WebCore::IDBDatabaseBackendLevelDB::count):
      (WebCore::IDBDatabaseBackendLevelDB::deleteRange):
      (WebCore::IDBDatabaseBackendLevelDB::clear):
      (WebCore::IDBDatabaseBackendLevelDB::transactionStarted):
      (WebCore::IDBDatabaseBackendLevelDB::transactionFinished):
      (WebCore::IDBDatabaseBackendLevelDB::transactionFinishedAndAbortFired):
      (WebCore::IDBDatabaseBackendLevelDB::transactionFinishedAndCompleteFired):
      (WebCore::IDBDatabaseBackendLevelDB::runIntVersionChangeTransaction):
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
      (WebCore::IDBObjectStoreBackendLevelDB::makeIndexWriters):
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
      (WebCore::IDBTransactionBackendLevelDB::abort):
      (WebCore::IDBTransactionBackendLevelDB::commit):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::removeIDBDatabaseBackend): Stub out this new interface method.
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a1fc575
    • beidson@apple.com's avatar
      [GTK] Generate API documentation for GObject DOM bindings · 76bc2cf5
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121538
      
      Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-10-18
      Reviewed by Gustavo Noronha Silva.
      
      * GNUmakefile.am: Initialize gdom_symbol_files variable.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76bc2cf5
  9. 30 Sep, 2013 1 commit
    • beidson@apple.com's avatar
      Remove IDBTracing.h. · 1367e453
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122118
      
      Reviewed by Alexey Proskuryakov.
      
      Global replace of "IDB_TRACE" with "LOG(StorageAPI)", and remove all notions of this header.
      
      * GNUmakefile.list.am:
      
      * Modules/indexeddb/IDBCursor.cpp:
      * Modules/indexeddb/IDBDatabase.cpp:
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      * Modules/indexeddb/IDBFactory.cpp:
      * Modules/indexeddb/IDBIndex.cpp:
      * Modules/indexeddb/IDBObjectStore.cpp:
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      * Modules/indexeddb/IDBRequest.cpp:
      * Modules/indexeddb/IDBTracing.h: Removed.
      * Modules/indexeddb/IDBTransaction.cpp:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/IDBBindingUtilities.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1367e453
  10. 25 Sep, 2013 2 commits
    • ryuan.choi@samsung.com's avatar
      Unreviewed build fix for EFL port. · 646840fa
      ryuan.choi@samsung.com authored
      IDBCursorBackendImpl and IDBDatabaseBackendImpl are renamed after r156406.
      
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      (WebCore::IDBTransactionBackendLevelDB::create):
      (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
      (WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
      (WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
      (WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
      (WebCore::IDBTransactionBackendLevelDB::database):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      646840fa
    • beidson@apple.com's avatar
      More refactoring to make the LevelDB dependencies of IDB more obvious. · f7ab638b
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121880
      
      Reviewed by Alexey Proskuryakov.
      
      This patch does three things:
      1 - Moves some files to the indexeddb/leveldb subdirectory, renaming them in the process.
      2 - Renames some classes.
      3 - Adds "USE(LEVELDB)" guards in addition to the ENABLE(INDEXED_DATABASE) guard for those files.
      
      Project file updates:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.xcodeproj/project.pbxproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      
      File renames, class renames, and USE(LEVELDB) guards:
      * Modules/indexeddb/IDBBackingStore.cpp: Removed.
      * Modules/indexeddb/IDBFactoryBackendInterface.cpp:
      (WebCore::IDBFactoryBackendInterface::create): Add a null return if USE(LEVELDB) is disabled as a stop gap measure until
        there is a non-LevelDB impl.
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBBackingStore.h.
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp.
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.h.
      * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
      * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp.
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.h.
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
      * Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp.
      * Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f7ab638b
  11. 09 Sep, 2013 1 commit
  12. 05 Mar, 2013 3 commits
    • alecflett@chromium.org's avatar
      IndexedDB: Properly refactor frontend/backend code by #includes · db5a6f7b
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110653
      
      Reviewed by Dimitri Glazkov.
      
      Source/WebCore:
      
      IndexedDB has a distinct backend and frontend, with well defined
      *Interface / *Callbacks classes distinguishing them, respectively.
      
      This makes sure that the frontend and backend do not include each
      other and fixes build problems that occurred as a result.
      
      Specifically this moves enums out of IDBCursor and IDBTransaction
      into IndexedDB.h in a new WebCore::IndexedDB namespace.
      
      No new tests, as this is just a refactor.
      
      Source/WebKit/chromium:
      
      Clean up the frontend/backend WebIDB* implementations to
      match the changes to webkit.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      db5a6f7b
    • dpranke@chromium.org's avatar
      Unreviewed, rolling out r144798. · 3a929ca2
      dpranke@chromium.org authored
      http://trac.webkit.org/changeset/144798
      https://bugs.webkit.org/show_bug.cgi?id=111478
      
      "broke chromium windows build" (Requested by dpranke on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-05
      
      Source/WebCore:
      
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBBackingStore.cpp:
      (WebCore::IDBBackingStore::Cursor::continueFunction):
      (WebCore::objectStoreCursorOptions):
      (WebCore::indexCursorOptions):
      (WebCore::IDBBackingStore::openObjectStoreCursor):
      (WebCore::IDBBackingStore::openObjectStoreKeyCursor):
      (WebCore::IDBBackingStore::openIndexKeyCursor):
      (WebCore::IDBBackingStore::openIndexCursor):
      * Modules/indexeddb/IDBBackingStore.h:
      (IDBBackingStore):
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::create):
      (WebCore::IDBCursor::IDBCursor):
      (WebCore::IDBCursor::continueFunction):
      (WebCore::IDBCursor::stringToDirection):
      (WebCore::IDBCursor::directionToString):
      * Modules/indexeddb/IDBCursor.h:
      (IDBCursor):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
      (WebCore::IDBCursorBackendImpl::deleteFunction):
      (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::create):
      (WebCore::IDBCursorBackendImpl::value):
      (IDBCursorBackendImpl):
      * Modules/indexeddb/IDBCursorBackendInterface.h:
      (WebCore):
      * Modules/indexeddb/IDBCursorWithValue.cpp:
      (WebCore::IDBCursorWithValue::create):
      (WebCore::IDBCursorWithValue::IDBCursorWithValue):
      * Modules/indexeddb/IDBCursorWithValue.h:
      (IDBCursorWithValue):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::transaction):
      * Modules/indexeddb/IDBDatabase.h:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::GetOperation::create):
      (WebCore::GetOperation::GetOperation):
      (GetOperation):
      (WebCore::OpenCursorOperation::create):
      (WebCore::OpenCursorOperation::OpenCursorOperation):
      (OpenCursorOperation):
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      (WebCore::IDBDatabaseBackendImpl::createIndex):
      (WebCore::IDBDatabaseBackendImpl::deleteIndex):
      (WebCore::IDBDatabaseBackendImpl::get):
      (WebCore::GetOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::put):
      (WebCore::PutOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
      (WebCore::IDBDatabaseBackendImpl::openCursor):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::CountOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteRange):
      (WebCore::DeleteRangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::clear):
      (WebCore::IDBDatabaseBackendImpl::transactionStarted):
      (WebCore::IDBDatabaseBackendImpl::transactionFinished):
      (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
      (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndCompleteFired):
      (WebCore::IDBDatabaseBackendImpl::createTransaction):
      (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      * Modules/indexeddb/IDBFactory.h:
      * Modules/indexeddb/IDBIndex.cpp:
      (WebCore):
      (WebCore::IDBIndex::openCursor):
      (WebCore::IDBIndex::openKeyCursor):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore):
      (WebCore::IDBObjectStore::openCursor):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::IDBRequest):
      (WebCore::IDBRequest::setCursorDetails):
      (WebCore::IDBRequest::setResultCursor):
      (WebCore::IDBRequest::onSuccess):
      * Modules/indexeddb/IDBRequest.h:
      (IDBRequest):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::create):
      (WebCore::IDBTransaction::IDBTransaction):
      (WebCore::IDBTransaction::stringToMode):
      (WebCore::IDBTransaction::modeToString):
      * Modules/indexeddb/IDBTransaction.h:
      (WebCore::IDBTransaction::isReadOnly):
      (WebCore::IDBTransaction::isVersionChange):
      (IDBTransaction):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::create):
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::mode):
      * Modules/indexeddb/IDBTransactionCoordinator.cpp:
      (WebCore::IDBTransactionCoordinator::processStartedTransactions):
      (WebCore::IDBTransactionCoordinator::canRunTransaction):
      * Modules/indexeddb/IndexedDB.h: Removed.
      * Target.pri:
      * WebCore.gypi:
      
      Source/WebKit/chromium:
      
      * src/AssertMatchingEnums.cpp:
      * src/IDBDatabaseBackendProxy.cpp:
      (WebKit::IDBDatabaseBackendProxy::openCursor):
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/WebIDBCallbacksImpl.cpp:
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::openCursor):
      * tests/IDBAbortOnCorruptTest.cpp:
      * tests/IDBDatabaseBackendTest.cpp:
      * tests/IDBFakeBackingStore.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a929ca2
    • alecflett@chromium.org's avatar
      IndexedDB: Properly refactor frontend/backend code by #includes · d608211e
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110653
      
      Reviewed by Dimitri Glazkov.
      
      Source/WebCore:
      
      IndexedDB has a distinct backend and frontend, with well defined
      *Interface / *Callbacks classes distinguishing them, respectively.
      
      This makes sure that the frontend and backend do not include each
      other and fixes build problems that occurred as a result.
      
      Specifically this moves enums out of IDBCursor and IDBTransaction
      into IndexedDB.h in a new WebCore::IndexedDB namespace.
      
      No new tests, as this is just a refactor.
      
      Source/WebKit/chromium:
      
      Clean up the frontend/backend WebIDB* implementations to
      match the changes to webkit.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d608211e
  13. 30 Jan, 2013 1 commit
  14. 28 Jan, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r140934, r140935, and r140937. · 1b629091
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/140934
      http://trac.webkit.org/changeset/140935
      http://trac.webkit.org/changeset/140937
      https://bugs.webkit.org/show_bug.cgi?id=108117
      
      Re-land some speculative rollouts - see wkbug.com/108048 for
      context (Requested by jsbell on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-28
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBCallbacks.h:
      (IDBCallbacks):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::create):
      (IDBCursorBackendImpl):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::onVersionChange):
      * Modules/indexeddb/IDBDatabase.h:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::openInternal):
      (WebCore::IDBFactory::deleteDatabase):
      * Modules/indexeddb/IDBFactory.h:
      (WebCore):
      (IDBFactory):
      * Modules/indexeddb/IDBFactory.idl:
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::createIndex):
      (WebCore::IDBObjectStore::openCursor):
      * Modules/indexeddb/IDBObjectStore.h:
      (WebCore::IDBObjectStore::openCursor):
      (IDBObjectStore):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::create):
      (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
      (WebCore::IDBOpenDBRequest::onBlocked):
      (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
      (WebCore::IDBOpenDBRequest::dispatchEvent):
      * Modules/indexeddb/IDBOpenDBRequest.h:
      (IDBOpenDBRequest):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::create):
      (WebCore::IDBRequest::IDBRequest):
      * Modules/indexeddb/IDBRequest.h:
      (IDBRequest):
      (WebCore::IDBRequest::taskType):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      (IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      * Modules/indexeddb/IDBUpgradeNeededEvent.cpp: Removed.
      * Modules/indexeddb/IDBUpgradeNeededEvent.h: Removed.
      * Modules/indexeddb/IDBUpgradeNeededEvent.idl: Removed.
      * Modules/indexeddb/IDBVersionChangeEvent.cpp:
      (WebCore::IDBVersionChangeEvent::create):
      (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
      * Modules/indexeddb/IDBVersionChangeEvent.h:
      (IDBVersionChangeEvent):
      (WebCore::IDBVersionChangeEvent::oldVersion):
      (WebCore::IDBVersionChangeEvent::newVersion):
      * Modules/indexeddb/IDBVersionChangeEvent.idl:
      * Modules/indexeddb/IDBVersionChangeRequest.cpp: Removed.
      * Modules/indexeddb/IDBVersionChangeRequest.h: Removed.
      * Modules/indexeddb/IDBVersionChangeRequest.idl: Removed.
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/EventNames.in:
      * dom/EventTarget.h:
      (WebCore):
      * dom/EventTargetFactory.in:
      
      Source/WebKit/chromium:
      
      * public/WebIDBCallbacks.h:
      (WebIDBCallbacks):
      * src/AssertMatchingEnums.cpp:
      * src/IDBCallbacksProxy.cpp:
      * src/IDBCallbacksProxy.h:
      (IDBCallbacksProxy):
      * src/WebIDBCallbacksImpl.cpp:
      * src/WebIDBCallbacksImpl.h:
      (WebIDBCallbacksImpl):
      * tests/IDBAbortOnCorruptTest.cpp:
      * tests/IDBDatabaseBackendTest.cpp:
      
      LayoutTests:
      
      * storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt:
      * storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-blocked-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-not-blocked-expected.txt:
      * storage/indexeddb/events-expected.txt: Added.
      * storage/indexeddb/events.html: Added.
      * storage/indexeddb/intversion-gated-on-delete-expected.txt:
      * storage/indexeddb/intversion-long-queue-expected.txt:
      * storage/indexeddb/intversion-upgrades-expected.txt:
      * storage/indexeddb/removed-expected.txt:
      * storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js:
      (versionChangeCallback):
      * storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js:
      (versionChangeCallback):
      * storage/indexeddb/resources/deletedatabase-blocked.js:
      (test.request.onsuccess.openOnSuccess.h.onversionchange):
      * storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js:
      (prepareDatabase.h.onversionchange):
      * storage/indexeddb/resources/deletedatabase-delayed-by-versionchange.js:
      (h1OpenSuccess.h1.onversionchange.h1OnVersionChange.h1.onversionchange):
      (h1OpenSuccess.h1.onversionchange):
      (h1OpenSuccess.request.onsuccess.h2OpenSuccess.h2.onversionchange):
      * storage/indexeddb/resources/deletedatabase-not-blocked.js:
      (test.request.onsuccess.openOnSuccess.h.onversionchange):
      * storage/indexeddb/resources/events.js: Added.
      (test):
      * storage/indexeddb/resources/intversion-gated-on-delete.js:
      (firstSuccessCallback):
      (connection1VersionChangeCallback):
      * storage/indexeddb/resources/intversion-long-queue.js:
      (connection1VersionChangeCallback):
      (deleteDatabaseBlockedCallback):
      (deleteDatabaseSuccessCallback):
      (connection2VersionChangeEvent):
      * storage/indexeddb/resources/removed.js:
      (test):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1b629091
  15. 27 Jan, 2013 1 commit
    • keishi@webkit.org's avatar
      Unreviewed, rolling out r140850. · 3511647f
      keishi@webkit.org authored
      http://trac.webkit.org/changeset/140850
      https://bugs.webkit.org/show_bug.cgi?id=107960
      
      r14602 caused 8 indexed tests to crash.
      
      Source/WebCore:
      
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::create):
      (IDBCursorBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
      (WebCore::OpenCursorOperation::perform):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::createIndex):
      (WebCore::IDBObjectStore::openCursor):
      * Modules/indexeddb/IDBObjectStore.h:
      (WebCore::IDBObjectStore::openCursor):
      (IDBObjectStore):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::create):
      (WebCore::IDBRequest::IDBRequest):
      * Modules/indexeddb/IDBRequest.h:
      (IDBRequest):
      (WebCore::IDBRequest::taskType):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      (IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      (IDBTransactionBackendInterface):
      
      Source/WebKit/chromium:
      
      * src/AssertMatchingEnums.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3511647f
  16. 25 Jan, 2013 1 commit
    • alecflett@chromium.org's avatar
      IndexedDB: Move TaskType enum to IDBDatabaseBackendInterface · b77ab0a4
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107960
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      The IDBTransactionBackendInterface class is going away,
      this is an easy search-and-replace patch to keep these
      changes out of more complex patches.
      
      No new tests, just part of a refactor.
      
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::create):
      (IDBCursorBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
      (WebCore::OpenCursorOperation::perform):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::createIndex):
      (WebCore::IDBObjectStore::openCursor):
      * Modules/indexeddb/IDBObjectStore.h:
      (WebCore::IDBObjectStore::openCursor):
      (IDBObjectStore):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::create):
      (WebCore::IDBRequest::IDBRequest):
      * Modules/indexeddb/IDBRequest.h:
      (IDBRequest):
      (WebCore::IDBRequest::taskType):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      (IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      
      Source/WebKit/chromium:
      
      Update asserts to reflect new enum location.
      
      * src/AssertMatchingEnums.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b77ab0a4
  17. 18 Jan, 2013 1 commit
    • alecflett@chromium.org's avatar
      IndexedDB: Switch to new createTransaction call · 26393b19
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107311
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Convert frontend callers to use the new backend createTransaction
      call which is the final divorce between the frontend and backend
      transaction objects. This allows an asynchronous call in Chromium
      and allows the front and backend to have their own lifecycle,
      allowing the backend to be cleaned up as soon as a transaction is complete,
      rather than waiting for the JS object to get cleaned up.
      
      No new tests, this is a refactor covered by existing tests.
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::transaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::commit):
      (WebCore::IDBDatabaseBackendImpl::abort):
      (WebCore::IDBDatabaseBackendImpl::createTransaction):
      (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
      * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
      (WebCore::IDBDatabaseCallbacksImpl::onAbort):
      (WebCore::IDBDatabaseCallbacksImpl::onComplete):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::create):
      (WebCore::IDBTransaction::IDBTransaction):
      (WebCore::IDBTransaction::setActive):
      (WebCore::IDBTransaction::abort):
      * Modules/indexeddb/IDBTransaction.h:
      (WebCore):
      (IDBTransaction):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::create):
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::commit):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::setCallbacks):
      
      Source/WebKit/chromium:
      
      * public/WebIDBTransaction.h:
      
      Remove an old method that nobody calls.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26393b19
  18. 10 Jan, 2013 1 commit
    • alecflett@chromium.org's avatar
      IndexedDB: Allow createIndex/createObjectStore to be asynchronous · 6d7e1488
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106377
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Migrate implementations of createIndex/deleteIndex,
      createObjectStore/deleteObjectStore over to IDBDatabaseBackendImpl,
      so that they can be asynchronous in multi-process ports.
      
      Has the side effect of removing the last consumers of
      IDBIndexBackendImpl and IDBObjectStoreBackendImpl. The former
      is removed complete and the latter becomes a temporary namespace
      pending a further more mechanical code shuffle.
      
      A key refactoring effect is that the IDBDatabaseBackendImpl
      now contains the authoritative IDBDatabaseMetadata hierarchy,
      and updates to it are consolidated in one place rather than
      scattered across a parallel object tree.
      
      No new tests as this is just refactoring.
      
      * Modules/indexeddb/IDBBackingStore.cpp: Simplify objectstore/index loading and propagate errors.
      (WebCore::IDBBackingStore::getObjectStores):
      (WebCore::IDBBackingStore::getIndexes):
      * Modules/indexeddb/IDBBackingStore.h:
      (IDBBackingStore):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp: Dependency cleanup.
      * Modules/indexeddb/IDBCursorBackendImpl.h: Dependency cleanup.
      (WebCore):
      * Modules/indexeddb/IDBDatabase.cpp: Frontend IDBObjectStores no longer hold onto backend objects.
      (WebCore::IDBDatabase::createObjectStore):
      (WebCore::IDBDatabase::deleteObjectStore):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Add all create/deleteIndex operations from IDBIndexBackendImpl.
      (WebCore::CreateObjectStoreOperation::create):
      (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
      (CreateObjectStoreOperation):
      (WebCore::DeleteObjectStoreOperation::create):
      (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
      (DeleteObjectStoreOperation):
      (WebCore::CreateObjectStoreAbortOperation::create):
      (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
      (CreateObjectStoreAbortOperation):
      (WebCore::DeleteObjectStoreAbortOperation::create):
      (WebCore::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
      (DeleteObjectStoreAbortOperation):
      (CreateIndexOperation):
      (WebCore::CreateIndexOperation::create):
      (WebCore::CreateIndexOperation::CreateIndexOperation):
      (WebCore):
      (DeleteIndexOperation):
      (WebCore::DeleteIndexOperation::create):
      (WebCore::DeleteIndexOperation::DeleteIndexOperation):
      (CreateIndexAbortOperation):
      (WebCore::CreateIndexAbortOperation::create):
      (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
      (DeleteIndexAbortOperation):
      (WebCore::DeleteIndexAbortOperation::create):
      (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
      (WebCore::GetOperation::GetOperation):
      (WebCore::IDBDatabaseBackendImpl::addObjectStore):
      (WebCore::IDBDatabaseBackendImpl::removeObjectStore):
      (WebCore::IDBDatabaseBackendImpl::addIndex):
      (WebCore::IDBDatabaseBackendImpl::removeIndex):
      (WebCore::IDBDatabaseBackendImpl::openInternal):
      (WebCore::IDBDatabaseBackendImpl::metadata):
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::CreateObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      (WebCore::IDBDatabaseBackendImpl::createIndex):
      (WebCore::CreateIndexOperation::perform):
      (WebCore::CreateIndexAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteIndex):
      (WebCore::DeleteIndexOperation::perform):
      (WebCore::DeleteIndexAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::get):
      (WebCore::IDBDatabaseBackendImpl::put):
      (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
      (WebCore::IDBDatabaseBackendImpl::count):
      (WebCore::DeleteRangeOperation::perform):
      (WebCore::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteDatabaseFinal):
      (WebCore::IDBDatabaseBackendImpl::loadObjectStores): Load directly into metadata from backing store.
      (WebCore::CreateObjectStoreAbortOperation::perform):
      (WebCore::DeleteObjectStoreAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (WebCore):
      (IDBDatabaseBackendImpl):
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      * Modules/indexeddb/IDBIndexBackendImpl.cpp: Removed.
      * Modules/indexeddb/IDBIndexBackendImpl.h: Removed.
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::IDBObjectStore): Frontend IDBIndex objects no longer hold onto backend.
      (WebCore::IDBObjectStore::createIndex):
      (WebCore::IDBObjectStore::deleteIndex):
      * Modules/indexeddb/IDBObjectStore.h:
      (WebCore::IDBObjectStore::create):
      (IDBObjectStore):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
      (WebCore):
      (IDBObjectStoreBackendImpl):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::objectStore):
      * Modules/indexeddb/IDBTransaction.h:
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (WebCore::IDBTransactionBackendImpl::objectStore):
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit/chromium:
      
      Remove this test as it makes no sense once the objectstore/index
      hierarchy is gone.
      
      * tests/IDBDatabaseBackendTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d7e1488
  19. 13 Dec, 2012 1 commit
    • dgrogan@chromium.org's avatar
      IndexedDB: Improve error messages · 7948a89c
      dgrogan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104624
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Add detail to error messages so that they are more helpful and can be
      traced back to a specific line of code.
      
      Updated test: transaction-error.html
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::openConnection):
      (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
      (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
      (WebCore::IDBDatabaseBackendImpl::close):
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
      (WebCore::IDBFactoryBackendImpl::deleteDatabase):
      (WebCore::IDBFactoryBackendImpl::open):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
      (WebCore::IDBObjectStoreBackendImpl::createIndex):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::commit):
      
      LayoutTests:
      
      Updated error message and establish that non-ascii characters in index
      names don't make it back to the browser properly.
      
      * storage/indexeddb/resources/shared.js:
      (unexpectedAbortCallback):
      * storage/indexeddb/resources/transaction-error.js:
      (testErrorFromCommit.trans.oncomplete.request.onupgradeneeded.trans.onabort):
      (testErrorFromCommit.trans.oncomplete.request.onupgradeneeded):
      (testErrorFromCommit.trans.oncomplete):
      (testErrorFromCommit):
      * storage/indexeddb/transaction-error-expected.txt:
      * storage/indexeddb/transaction-error.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7948a89c
  20. 05 Dec, 2012 2 commits
    • jsbell@chromium.org's avatar
      IndexedDB: Allow multiple transactions to interleave request execution · 5e62a2fe
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97570
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Implement spec logic for allowing read-only transactions, and read-write transactions
      with non-overlapping scopes, to run concurrently. Transactions all still run in the
      same thread with tasks triggered via timers, so tasks and the underlying database
      operations are interleaved rather than truly parallelized.
      
      Within IDBTransactionCoordinator, rename started->queued, running->started to match
      spec terminology and clear up confusion.
      
      Test: storage/indexeddb/transaction-coordination-across-databases.html
            storage/indexeddb/transaction-coordination-within-database.html
            storage/indexeddb/transaction-readwrite-exclusive.html
            storage/indexeddb/transaction-scope-sequencing.html
            storage/indexeddb/transaction-starvation.html
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Use IDBTransaction::Mode enum
      (WebCore::IDBDatabaseBackendImpl::createTransaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h: Ditto.
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h: Ditto.
      (IDBDatabaseBackendInterface):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp: Convert scope as a HashSet for
      fast intersecting.
      (WebCore::IDBTransactionBackendImpl::create):
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::mode):
      (WebCore::IDBTransactionBackendImpl::scope):
      * Modules/indexeddb/IDBTransactionCoordinator.cpp: Spec logic goes here.
      (WebCore::IDBTransactionCoordinator::processStartedTransactions): Extend this
      method to test all plausibly runnable transactions.
      (WebCore):
      (WebCore::IDBTransactionCoordinator::canRunTransaction): Test to see if one
      particular transaction can be run.
      (WebCore::IDBTransactionCoordinator::doScopesOverlap): Do a quick intersection
      test between transaction scopes.
      * Modules/indexeddb/IDBTransactionCoordinator.h:
      (IDBTransactionCoordinator):
      
      Source/WebKit/chromium:
      
      Map to IDBTransaction::Mode enum as appropriate.
      
      * src/IDBDatabaseBackendProxy.cpp:
      (WebKit::IDBDatabaseBackendProxy::createTransaction):
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::createTransaction):
       * tests/IDBDatabaseBackendTest.cpp:
      
      LayoutTests:
      
      New tests for parallel transactions, update existing tests that relied on sequential execution.
      
      * storage/indexeddb/database-close-expected.txt:
      * storage/indexeddb/mozilla/clear-expected.txt:
      * storage/indexeddb/mozilla/resources/clear.js: Split up transaction steps.
      * storage/indexeddb/resources/database-close.js: Don't log on individual transaction completion.
      * storage/indexeddb/resources/transaction-coordination-within-database.js: Added.
      * storage/indexeddb/resources/transaction-scope-sequencing.js: Added.
      * storage/indexeddb/resources/transaction-starvation.js: Added.
      * storage/indexeddb/transaction-coordination-within-database-expected.txt: Added.
      * storage/indexeddb/transaction-coordination-within-database.html: Added.
      * storage/indexeddb/transaction-scope-sequencing-expected.txt: Added.
      * storage/indexeddb/transaction-scope-sequencing.html: Added.
      * storage/indexeddb/transaction-starvation-expected.txt: Added.
      * storage/indexeddb/transaction-starvation.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5e62a2fe
    • jsbell@chromium.org's avatar
      IndexedDB: Replace use of ScriptExecutionContext::Task (Part 2) · d7b6d0fb
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103931
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Actually drop use of ScriptExecutionContext::Task and remove incorrect usage of
      ThreadSafeRefCounted<>. Define a new IDBTransactionBackendImpl::Operation base class
      for operations; storage of per-operation data becomes explicit.
      
      No new tests - just a refactor.
      
      * Modules/indexeddb/IDBCallbacks.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::CursorIterationOperation::create):
      (IDBCursorBackendImpl::CursorIterationOperation):
      (WebCore::IDBCursorBackendImpl::CursorIterationOperation::CursorIterationOperation):
      (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::create):
      (IDBCursorBackendImpl::CursorAdvanceOperation):
      (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::CursorAdvanceOperation):
      (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::create):
      (IDBCursorBackendImpl::CursorPrefetchIterationOperation):
      (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::CursorPrefetchIterationOperation):
      (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::perform):
      (WebCore::IDBCursorBackendImpl::CursorIterationOperation::perform):
      (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
      * Modules/indexeddb/IDBCursorBackendInterface.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBDatabase.cpp:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::create):
      (IDBDatabaseBackendImpl::CreateObjectStoreOperation):
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::CreateObjectStoreOperation):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::create):
      (IDBDatabaseBackendImpl::DeleteObjectStoreOperation):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
      (IDBDatabaseBackendImpl::VersionChangeOperation):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::create):
      (IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::create):
      (IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
      (IDBDatabaseBackendImpl::VersionChangeAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::VersionChangeAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBDatabaseCallbacks.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      * Modules/indexeddb/IDBFactoryBackendInterface.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBIndexBackendImpl.cpp:
      (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::create):
      (IDBIndexBackendImpl::OpenIndexCursorOperation):
      (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::OpenIndexCursorOperation):
      (WebCore::IDBIndexBackendImpl::IndexCountOperation::create):
      (IDBIndexBackendImpl::IndexCountOperation):
      (WebCore::IDBIndexBackendImpl::IndexCountOperation::IndexCountOperation):
      (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::create):
      (IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation):
      (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::IndexReferencedValueRetrievalOperation):
      (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::create):
      (IDBIndexBackendImpl::IndexValueRetrievalOperation):
      (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::IndexValueRetrievalOperation):
      (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::perform):
      (WebCore::IDBIndexBackendImpl::openCursor):
      (WebCore::IDBIndexBackendImpl::openKeyCursor):
      (WebCore::IDBIndexBackendImpl::IndexCountOperation::perform):
      (WebCore::IDBIndexBackendImpl::count):
      (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
      (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::perform):
      (WebCore::IDBIndexBackendImpl::get):
      (WebCore::IDBIndexBackendImpl::getKey):
      * Modules/indexeddb/IDBIndexBackendInterface.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBKey.h: Remove bogus "ThreadSafe"
      (IDBKey):
      * Modules/indexeddb/IDBKeyRange.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::ObjectStoreRetrievalOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreStorageOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::ObjectStoreStorageOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::ObjectStoreIndexesReadyOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::ObjectStoreDeletionOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreClearOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::ObjectStoreClearOperation):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::create):
      (IDBObjectStoreBackendImpl::CreateIndexOperation):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::CreateIndexOperation):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::create):
      (IDBObjectStoreBackendImpl::DeleteIndexOperation):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::DeleteIndexOperation):
      (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::create):
      (IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation):
      (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::OpenObjectStoreCursorOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreCountOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::ObjectStoreCountOperation):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::create):
      (IDBObjectStoreBackendImpl::CreateIndexAbortOperation):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::CreateIndexAbortOperation):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::create):
      (IDBObjectStoreBackendImpl::DeleteIndexAbortOperation):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
      (WebCore::IDBObjectStoreBackendImpl::get):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::put):
      (WebCore):
      (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::clear):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::createIndex):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::openCursor):
      (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::count):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::perform):
      * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBRequest.h: Remove bogus "ThreadSafe"
      (IDBRequest):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl): Appease RefPtr<> adoption strictness.
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::taskTimerFired):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (Operation):
      (WebCore::IDBTransactionBackendImpl::Operation::~Operation):
      (IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      * Modules/indexeddb/IDBTransactionBackendInterface.h: Remove bogus "ThreadSafe"
      
      Source/WebKit/chromium:
      
      Now that IDBCallbacks uses real RefPtr<> a mock class needs to be heap allocated.
      
      * tests/IDBAbortOnCorruptTest.cpp:
      (WebCore::MockIDBCallbacks::create):
      (WebCore::MockIDBCallbacks::MockIDBCallbacks):
      (MockIDBCallbacks):
      (WebCore::TEST):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d7b6d0fb
  21. 03 Dec, 2012 1 commit
    • jsbell@chromium.org's avatar
      IndexedDB: Rename exception enum members from UGLY_ERR to PrettyError · e9e60209
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103759
      
      Reviewed by Darin Fisher.
      
      Source/WebCore:
      
      Now that IDBDatabaseException isn't exposed to script with constants, the exception types
      can be renamed to match the much friendlier names used in newer iterations of the spec. Also
      remove the legacy/unused types.
      
      No new tests, just constant renames.
      
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::update):
      (WebCore::IDBCursor::advance):
      (WebCore::IDBCursor::continueFunction):
      (WebCore::IDBCursor::deleteFunction):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::continueFunction):
      (WebCore::IDBCursorBackendImpl::advance):
      (WebCore::IDBCursorBackendImpl::prefetchContinue):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::createObjectStore):
      (WebCore::IDBDatabase::deleteObjectStore):
      (WebCore::IDBDatabase::transaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
      (WebCore::IDBDatabaseBackendImpl::openConnection):
      (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
      (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
      (WebCore::IDBDatabaseBackendImpl::close):
      * Modules/indexeddb/IDBDatabaseException.cpp: Tidying and renaming.
      (WebCore):
      (WebCore::getErrorEntry):
      * Modules/indexeddb/IDBDatabaseException.h:
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::cmp):
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
      (WebCore::IDBFactoryBackendImpl::deleteDatabase):
      (WebCore::IDBFactoryBackendImpl::open):
      * Modules/indexeddb/IDBIndex.cpp:
      (WebCore::IDBIndex::openCursor):
      (WebCore::IDBIndex::count):
      (WebCore::IDBIndex::openKeyCursor):
      (WebCore::IDBIndex::get):
      (WebCore::IDBIndex::getKey):
      * Modules/indexeddb/IDBIndexBackendImpl.cpp:
      (WebCore::IDBIndexBackendImpl::openCursor):
      (WebCore::IDBIndexBackendImpl::openKeyCursor):
      (WebCore::IDBIndexBackendImpl::count):
      (WebCore::IDBIndexBackendImpl::get):
      (WebCore::IDBIndexBackendImpl::getKey):
      * Modules/indexeddb/IDBKeyRange.cpp:
      (WebCore::IDBKeyRange::only):
      (WebCore::IDBKeyRange::lowerBound):
      (WebCore::IDBKeyRange::upperBound):
      (WebCore::IDBKeyRange::bound):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::get):
      (WebCore::IDBObjectStore::put):
      (WebCore::IDBObjectStore::deleteFunction):
      (WebCore::IDBObjectStore::clear):
      (WebCore):
      (WebCore::IDBObjectStore::createIndex):
      (WebCore::IDBObjectStore::index):
      (WebCore::IDBObjectStore::deleteIndex):
      (WebCore::IDBObjectStore::openCursor):
      (WebCore::IDBObjectStore::count):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::get):
      (WebCore::IDBObjectStoreBackendImpl::put):
      (WebCore):
      (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
      (WebCore::IDBObjectStoreBackendImpl::clear):
      (WebCore::IDBObjectStoreBackendImpl::createIndex):
      (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
      (WebCore::IDBObjectStoreBackendImpl::openCursor):
      (WebCore::IDBObjectStoreBackendImpl::count):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::dispatchEvent):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::result):
      (WebCore::IDBRequest::error):
      (WebCore::IDBRequest::errorCode):
      (WebCore::IDBRequest::webkitErrorMessage):
      (WebCore::IDBRequest::abort):
      (WebCore::IDBRequest::dispatchEvent):
      (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::objectStore):
      (WebCore::IDBTransaction::abort):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::objectStore):
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::commit):
      
      Source/WebKit/chromium:
      
      Update IDBDatabaseException enum names/values to match WebCore.
      
      * public/WebIDBDatabaseException.h:
      * src/AssertMatchingEnums.cpp:
      * src/IDBFactoryBackendProxy.cpp:
      (WebKit::IDBFactoryBackendProxy::allowIndexedDB):
      * tests/IDBRequestTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e9e60209
  22. 28 Nov, 2012 1 commit
    • jsbell@chromium.org's avatar
      [Chromium] IndexedDB: Assert/crash in indexing layout tests in content_shell · c89a69f5
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103562
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      In multi-process ports, an commit request or setIndexesReady request may arrive from the
      front-end after the back-end has already aborted. Don't freak out if those occur.
      
      Tests: storage/indexeddb/index-population.html
             storage/indexeddb/lazy-index-population.html
             storage/indexeddb/transaction-error.html
      
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::setIndexKeys): Ensure transaction hasn't finished before continuing.
      (WebCore::IDBObjectStoreBackendImpl::setIndexesReady): Ditto.
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::commit): Ignore a commit request if already aborted.
      
      LayoutTests:
      
      Fix an expectation glitch that may arise in multi-process ports (an error on
      the open request may arrive before logging has stopped; safe to ignore it).
      
      * storage/indexeddb/resources/transaction-error.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c89a69f5
  23. 27 Nov, 2012 2 commits
    • jsbell@chromium.org's avatar
      IndexedDB: Simplify transaction timers and event tracking · 9fbdd354
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=102984
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Now that the transaction "commit" decision is made on the front-end, the back end no-longer
      needs to be aware of when individual IDBRequests have dispatched to script or track pending
      events (except for preemptive ones like createIndex). This also lets two timers be collapsed
      into one which significantly simplifies the code flow in IDBTransactionBackendImpl.
      
      No new tests - just simplification. Exercised by storage/indexeddb/transaction-*.html etc.
      
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::prefetchContinueInternal): No more tracking.
      (WebCore::IDBCursorBackendImpl::prefetchReset): No more tracking.
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal): No more tracking.
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal): No more tracking.
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::setIndexesReadyInternal): No more tracking.
      (WebCore::IDBObjectStoreBackendImpl::createIndexInternal): No more tracking.
      (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal): No more tracking.
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::dispatchEvent): Order must be:
      1. request is unregistered from transaction (so request list may be empty)
      2. abort transaction if event being dispatched was an error
      3. deactivate transaction (which may commit if #1 left it empty and #2 didn't abort)
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl): Need to track if commit
      was requested; previously the front end would have triggered an event timer which, on
      completion, would be the signal that the front end was finished.
      (WebCore::IDBTransactionBackendImpl::scheduleTask): Schedule a timer to service the new
      task, if necessary.
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::hasPendingTasks):
      (WebCore::IDBTransactionBackendImpl::commit):
      (WebCore::IDBTransactionBackendImpl::taskTimerFired): Picks up "commit" responsibilities
      from the now deleted taskEventTimerFired, if everything is truly complete done.
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      (WebCore::IDBTransactionBackendInterface::didCompleteTaskEvents): Removed from interface.
      
      Source/WebKit/chromium:
      
      Remove now-unused didCompleteTaskEvents() method.
      
      * src/IDBTransactionBackendProxy.cpp:
      * src/IDBTransactionBackendProxy.h:
      (IDBTransactionBackendProxy):
      * src/WebIDBTransactionImpl.cpp:
      * src/WebIDBTransactionImpl.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9fbdd354
    • alecflett@chromium.org's avatar
      IndexedDB: stub out IDBDatabaseBackendInterface::createTransaction · 34e21655
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=102730
      
      Reviewed by Darin Fisher.
      
      Source/WebCore:
      
      Stub out and support passing a 64-bit transaction id
      so the frontend can refer to transactions by id rather than
      a proxy object or a direct pointer reference. This will ultimately
      loosen ownership and lifetime of transactions from the frontend
      and backend.
      
      No new tests, this is just part of a refactor.
      
      * Modules/indexeddb/IDBDatabase.cpp:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore):
      (WebCore::IDBDatabaseBackendImpl::transaction):
      (WebCore::IDBDatabaseBackendImpl::createTransaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      (IDBDatabaseBackendInterface):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::create):
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::id):
      
      Source/WebKit/chromium:
      
      Add support for new createTransaction() method in both sides
      of the WebKit API.
      
      * public/WebIDBDatabase.h:
      (WebIDBDatabase):
      (WebKit::WebIDBDatabase::createTransaction):
      * src/IDBDatabaseBackendProxy.cpp:
      (WebKit):
      (WebKit::IDBDatabaseBackendProxy::createTransaction):
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::createTransaction):
      (WebKit):
      * src/WebIDBDatabaseImpl.h:
      (WebIDBDatabaseImpl):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34e21655
  24. 20 Nov, 2012 1 commit
    • jsbell@chromium.org's avatar
      IndexedDB: Move control of transaction completion to front end · 1295748e
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=100903
      
      Reviewed by Tony Chang.
      
      "When a transaction can no longer become active, the implementation must attempt to
      commit it" - that is, all requests have dispatched success/error events and no further
      requests have been made. Previously, this was done by the back end waiting for events
      from the front end, but the front end can more efficiently make the decision.
      
      There should be no detectable behavior change.
      
      Tests: storage/indexeddb/transaction-*.html
      
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::IDBTransaction):
      (WebCore::IDBTransaction::setActive):
      (WebCore::IDBTransaction::registerRequest):
      * Modules/indexeddb/IDBTransaction.h:
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::hasPendingTasks): Added.
      (WebCore::IDBTransactionBackendImpl::didCompleteTaskEvents):
      (WebCore::IDBTransactionBackendImpl::run):
      (WebCore::IDBTransactionBackendImpl::taskEventTimerFired):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1295748e
  25. 16 Nov, 2012 1 commit
  26. 15 Nov, 2012 1 commit
    • jsbell@chromium.org's avatar
      IndexedDB: Indexing tests are flaky-crashing · 25b83bdf
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=102283
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Processing the final task can cause IDBTransactionBackendImpl references to be released
      by all holders. Prior to looping over the tasks (or, in an even earlier implementation,
      swapping queues) control would fall off the end of the function. The loop termination
      check introduced in http://wkrev.com/134529 requires that |this| be kept alive until
      the method completes.
      
      Test: storage/indexeddb/transaction-crash-in-tasks.html
      
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::abort): Rename self => protect.
      (WebCore::IDBTransactionBackendImpl::commit): Rename self => protect.
      (WebCore::IDBTransactionBackendImpl::taskTimerFired): New self-ref.
      
      LayoutTests:
      
      Reduced repro case, although the behavior is still flaky.
      
      * storage/indexeddb/transaction-crash-in-tasks-expected.txt: Added.
      * storage/indexeddb/transaction-crash-in-tasks.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      25b83bdf
  27. 14 Nov, 2012 1 commit
  28. 13 Nov, 2012 1 commit
    • jsbell@chromium.org's avatar
      IndexedDB: Run multiple tasks per transaction tick · aeac0f8f
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97738
      
      Reviewed by Tony Chang.
      
      Process multiple tasks from the pending queue(s) when the timer fires. The
      task may initiate new tasks that change which queue is active (e.g. indexing
      operations) so the loop must re-check each tick which queue to use.
      
      In DumpRenderTree, time to make 20k puts/20k gets dropped from 3.2s to 2.0s (-37%);
      in Chromium's content_shell, the time dropped from 8.1s to 4.6s (-42%).
      
      No new tests - just perf improvements, covered by (nearly) all existing IDB tests.
      
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::abort): Use takeFirst() to clean up code.
      (WebCore::IDBTransactionBackendImpl::taskTimerFired): Process as many tasks as are available.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aeac0f8f
  29. 09 Nov, 2012 2 commits
    • alecflett@chromium.org's avatar
      IndexedDB: Combine IDBBackingStore and IDBLevelDBBackingStore · 623ffce4
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=101415
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Combine abstract interface IDBBackingStore with its only
      implementation, IDBLevelDBBackingStore, to reduce code
      complexity. The legacy structure existed to support a SQLLite
      IDBBackingStore, but it is no longer worth the complexity to
      support this abstraction.
      
      Changes include:
      1) Merging IDBLevelDBBackingStore into IDBBackingStore.
      
      2) Merge together IDBBackingStore's inner classes: Cursor,
      Transaction, and ObjectStoreRecordIdentfier with their respective
      subclasses in IDBLevelDBBackingStore.
      
      3) Simplifying the inner Transaction class to not be refcounted or
      virtualized, to allow it to be a simple concrete member of its
      owner, IDBTransactionBackendImpl.
      
      No new tests as this is purely a refactor.
      
      * Modules/indexeddb/IDBBackingStore.cpp:
      (WebCore::recordInternalError):
      (WebCore::setUpMetadata):
      (WebCore::IDBBackingStore::IDBBackingStore):
      (WebCore):
      (WebCore::IDBBackingStore::~IDBBackingStore):
      (WebCore::IDBBackingStore::open):
      (WebCore::IDBBackingStore::getDatabaseNames):
      (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
      (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
      (WebCore::IDBBackingStore::updateIDBDatabaseIntVersion):
      (WebCore::IDBBackingStore::updateIDBDatabaseMetaData):
      (WebCore::deleteRange):
      (WebCore::IDBBackingStore::deleteDatabase):
      (WebCore::IDBBackingStore::getObjectStores):
      (WebCore::setMaxObjectStoreId):
      (WebCore::IDBBackingStore::createObjectStore):
      (WebCore::IDBBackingStore::deleteObjectStore):
      (WebCore::IDBBackingStore::getRecord):
      (WebCore::IDBBackingStore::putRecord):
      (WebCore::IDBBackingStore::clearObjectStore):
      (WebCore::IDBBackingStore::deleteRecord):
      (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStore::keyExistsInObjectStore):
      (WebCore::IDBBackingStore::getIndexes):
      (WebCore::setMaxIndexId):
      (WebCore::IDBBackingStore::createIndex):
      (WebCore::IDBBackingStore::deleteIndex):
      (WebCore::IDBBackingStore::putIndexDataForRecord):
      (WebCore::IDBBackingStore::deleteIndexDataForRecord):
      (WebCore::IDBBackingStore::findKeyInIndex):
      (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
      (WebCore::IDBBackingStore::keyExistsInIndex):
      (WebCore::IDBBackingStore::Cursor::Cursor):
      (WebCore::IDBBackingStore::Cursor::firstSeek):
      (WebCore::IDBBackingStore::Cursor::advance):
      (WebCore::IDBBackingStore::Cursor::continueFunction):
      (WebCore::IDBBackingStore::Cursor::haveEnteredRange):
      (WebCore::IDBBackingStore::Cursor::isPastBounds):
      (WebCore::ObjectStoreKeyCursorImpl::create):
      (ObjectStoreKeyCursorImpl):
      (WebCore::ObjectStoreKeyCursorImpl::value):
      (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
      (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
      (WebCore::ObjectStoreCursorImpl::create):
      (ObjectStoreCursorImpl):
      (WebCore::ObjectStoreCursorImpl::value):
      (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
      (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
      (WebCore::IndexKeyCursorImpl::create):
      (IndexKeyCursorImpl):
      (WebCore::IndexKeyCursorImpl::value):
      (WebCore::IndexKeyCursorImpl::primaryKey):
      (WebCore::IndexKeyCursorImpl::recordIdentifier):
      (WebCore::IndexKeyCursorImpl::IndexKeyCursorImpl):
      (WebCore::IndexKeyCursorImpl::loadCurrentRow):
      (WebCore::IndexCursorImpl::create):
      (IndexCursorImpl):
      (WebCore::IndexCursorImpl::value):
      (WebCore::IndexCursorImpl::primaryKey):
      (WebCore::IndexCursorImpl::recordIdentifier):
      (WebCore::IndexCursorImpl::IndexCursorImpl):
      (WebCore::IndexCursorImpl::loadCurrentRow):
      (WebCore::objectStoreCursorOptions):
      (WebCore::indexCursorOptions):
      (WebCore::IDBBackingStore::openObjectStoreCursor):
      (WebCore::IDBBackingStore::openObjectStoreKeyCursor):
      (WebCore::IDBBackingStore::openIndexKeyCursor):
      (WebCore::IDBBackingStore::openIndexCursor):
      (WebCore::IDBBackingStore::Transaction::Transaction):
      (WebCore::IDBBackingStore::Transaction::begin):
      (WebCore::IDBBackingStore::Transaction::commit):
      (WebCore::IDBBackingStore::Transaction::rollback):
      * Modules/indexeddb/IDBBackingStore.h:
      (WebCore):
      (IDBBackingStore):
      (RecordIdentifier):
      (WebCore::IDBBackingStore::RecordIdentifier::create):
      (WebCore::IDBBackingStore::RecordIdentifier::~RecordIdentifier):
      (WebCore::IDBBackingStore::RecordIdentifier::isValid):
      (WebCore::IDBBackingStore::RecordIdentifier::primaryKey):
      (WebCore::IDBBackingStore::RecordIdentifier::setPrimaryKey):
      (WebCore::IDBBackingStore::RecordIdentifier::version):
      (WebCore::IDBBackingStore::RecordIdentifier::setVersion):
      (WebCore::IDBBackingStore::RecordIdentifier::RecordIdentifier):
      (Transaction):
      (WebCore::IDBBackingStore::Transaction::levelDBTransactionFrom):
      (CursorOptions):
      (Cursor):
      (WebCore::IDBBackingStore::Cursor::Cursor):
      (WebCore::IDBBackingStore::Cursor::key):
      (WebCore::IDBBackingStore::Cursor::primaryKey):
      (WebCore::IDBBackingStore::Cursor::~Cursor):
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      (WebCore::IDBFactoryBackendImpl::openBackingStore):
      * Modules/indexeddb/IDBIndexBackendImpl.cpp:
      (WebCore::IDBIndexBackendImpl::countInternal):
      * Modules/indexeddb/IDBLevelDBBackingStore.h: Removed.
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
      (WebCore::IDBObjectStoreBackendImpl::putInternal):
      (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::commit):
      (WebCore::IDBTransactionBackendImpl::taskTimerFired):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (WebCore::IDBTransactionBackendImpl::backingStoreTransaction):
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit/chromium:
      
      Remove method that is no longer in the base class.
      
      * tests/IDBFakeBackingStore.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      623ffce4
    • jsbell@chromium.org's avatar
      Unreviewed, rolling out r134101. · a55cc05d
      jsbell@chromium.org authored
      http://trac.webkit.org/changeset/134101
      https://bugs.webkit.org/show_bug.cgi?id=101790
      
      IDBDatabaseBackendTest.BackingStoreRetention failing
      (Requested by jsbell|gardener on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-09
      
      Source/WebCore:
      
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBBackingStore.cpp:
      (WebCore::IDBLevelDBBackingStore::IDBLevelDBBackingStore):
      (WebCore::IDBLevelDBBackingStore::~IDBLevelDBBackingStore):
      (WebCore::IDBLevelDBBackingStore::open):
      (WebCore::IDBLevelDBBackingStore::getDatabaseNames):
      (WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData):
      (WebCore::IDBLevelDBBackingStore::createIDBDatabaseMetaData):
      (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseIntVersion):
      (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseMetaData):
      (WebCore::IDBLevelDBBackingStore::deleteDatabase):
      (WebCore::IDBLevelDBBackingStore::getObjectStores):
      (WebCore::IDBLevelDBBackingStore::createObjectStore):
      (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
      (WebCore::IDBLevelDBBackingStore::getRecord):
      (WebCore):
      (WebCore::IDBLevelDBBackingStore::putRecord):
      (WebCore::IDBLevelDBBackingStore::clearObjectStore):
      (WebCore::IDBLevelDBBackingStore::createInvalidRecordIdentifier):
      (WebCore::IDBLevelDBBackingStore::deleteRecord):
      (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber):
      (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
      (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
      (WebCore::IDBLevelDBBackingStore::getIndexes):
      (WebCore::IDBLevelDBBackingStore::createIndex):
      (WebCore::IDBLevelDBBackingStore::deleteIndex):
      (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
      (WebCore::IDBLevelDBBackingStore::deleteIndexDataForRecord):
      (WebCore::IDBLevelDBBackingStore::findKeyInIndex):
      (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
      (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
      (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
      (WebCore::IDBLevelDBBackingStore::openObjectStoreKeyCursor):
      (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
      (WebCore::IDBLevelDBBackingStore::openIndexCursor):
      (WebCore::IDBLevelDBBackingStore::createTransaction):
      (WebCore::IDBLevelDBBackingStore::Transaction::create):
      (WebCore::IDBLevelDBBackingStore::Transaction::Transaction):
      (WebCore::IDBLevelDBBackingStore::Transaction::begin):
      (WebCore::IDBLevelDBBackingStore::Transaction::commit):
      (WebCore::IDBLevelDBBackingStore::Transaction::rollback):
      (WebCore::IDBLevelDBBackingStore::backingStoreExists):
      * Modules/indexeddb/IDBBackingStore.h:
      (WebCore):
      (WebCore::IDBBackingStore::~IDBBackingStore):
      (IDBBackingStore):
      (RecordIdentifier):
      (WebCore::IDBBackingStore::Cursor::~Cursor):
      (WebCore::IDBBackingStore::Transaction::~Transaction):
      (Transaction):
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      (WebCore::IDBFactoryBackendImpl::openBackingStore):
      * Modules/indexeddb/IDBLevelDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/IDBBackingStore.h.
      (WebCore):
      (IDBLevelDBBackingStore):
      (Transaction):
      (WebCore::IDBLevelDBBackingStore::Transaction::levelDBTransactionFrom):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
      (WebCore::IDBObjectStoreBackendImpl::putInternal):
      (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::commit):
      (WebCore::IDBTransactionBackendImpl::taskTimerFired):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (WebCore::IDBTransactionBackendImpl::backingStoreTransaction):
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit/chromium:
      
      * tests/IDBFakeBackingStore.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a55cc05d