Move basic IDBBackingStoreTransaction operations to IDBServerConnection
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Nov 2013 03:59:48 +0000 (03:59 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Nov 2013 03:59:48 +0000 (03:59 +0000)
commite7905e93fe9ff74c698bf6baf3dd1c4ae0a6c30a
tree034c5ea194dc9f55dad3b279f427fcf8cb07cd7e
parent5aa0cbd127b92f294a3bff574cafc74e8250b013
Move basic IDBBackingStoreTransaction operations to IDBServerConnection
https://bugs.webkit.org/show_bug.cgi?id=124244

Reviewed by Tim Horton (and unofficially Anders Carlsson).

This patch:
- Makes IDBBackingStore the owner of an IDBBackingStoreTransaction.
- Adds the integer transaction ID to IDBBackingStoreTransaction for reference.
- Removes IDBTransactionBackend’s reliance on IDBBackingStoreTransaction by moving
  necessary methods to IDBServerConnection.
- Renames the IDBTransactionBackend::backingStoreTransaction() accessor to
  deprecatedBackingStoreTransaction to make it clear it’s on the way out.

* Modules/indexeddb/IDBBackingStoreInterface.h:

* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::setIndexKeys):

* Modules/indexeddb/IDBServerConnection.h:

* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::IDBTransactionBackend):
(WebCore::IDBTransactionBackend::~IDBTransactionBackend):
(WebCore::IDBTransactionBackend::deprecatedBackingStoreTransaction):
(WebCore::IDBTransactionBackend::scheduleTask):
(WebCore::IDBTransactionBackend::abort):
(WebCore::IDBTransactionBackend::commit):
(WebCore::IDBTransactionBackend::taskTimerFired):
* Modules/indexeddb/IDBTransactionBackend.h:

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::CreateObjectStoreOperation::perform):
(WebCore::CreateIndexOperation::perform):
(WebCore::DeleteIndexOperation::perform):
(WebCore::GetOperation::perform):
(WebCore::PutOperation::perform):
(WebCore::OpenCursorOperation::perform):
(WebCore::CountOperation::perform):
(WebCore::DeleteRangeOperation::perform):
(WebCore::ClearOperation::perform):
(WebCore::DeleteObjectStoreOperation::perform):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):

* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
(WebCore::IDBBackingStoreLevelDB::generateKey):
(WebCore::IDBBackingStoreLevelDB::updateKeyGenerator):
(WebCore::IDBBackingStoreLevelDB::establishBackingStoreTransaction):
(WebCore::IDBBackingStoreLevelDB::deprecatedBackingStoreTransaction):
(WebCore::IDBBackingStoreLevelDB::removeBackingStoreTransaction):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:

* Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp:
(WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
(WebCore::IDBBackingStoreTransactionLevelDB::~IDBBackingStoreTransactionLevelDB):
(WebCore::IDBBackingStoreTransactionLevelDB::resetTransaction):
* Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:

* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
(WebCore::IDBServerConnectionLevelDB::deprecatedBackingStoreTransaction):
(WebCore::IDBServerConnectionLevelDB::openTransaction):
(WebCore::IDBServerConnectionLevelDB::beginTransaction):
(WebCore::IDBServerConnectionLevelDB::commitTransaction):
(WebCore::IDBServerConnectionLevelDB::resetTransaction):
(WebCore::IDBServerConnectionLevelDB::rollbackTransaction):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBBackingStoreInterface.h
Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp
Source/WebCore/Modules/indexeddb/IDBServerConnection.h
Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp
Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h
Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h