Part of the transaction id refactor In IDBDatabase::transaction, make sure we call IDBDatabaseBackend::createTransaction() rather than transaction()
Rather than calling through IDBTransactionBackendInterface, backend object store calls should just call through IDBDatabase with a transaction id specifically: (leaving out the details of request/callback hookup/etc) * IDBObjectStoreBackendInterface::openCursor() becomes IDBDatabaseBackendInterface::openCursor(transaction_id, objectstore_id, -1, keyRange, direction, key=false); * IDBObjectStoreBackendInterface::openKeyCursor() becomes IDBDatabaseBackendInterface::openCursor(transaction_id, objectstore_id, -1, keyRange, direction, key=true); * IDBObjectStoreBackendInterface::count() becomes IDBDatabaseBackendInterface::count(transaction_id, objectstore_id, -1, keyRange); * IDBObjectStoreBackendInterface::get() becomes IDBDatabaseBackendInterface::get(transaction_id, objectstore_id, -1, keyRange, key=false); * IDBObjectStoreBackendInterface::put() becomes IDBDatabaseBackendInterface::put(transaction_id, objectstore_id, -1, key); * IDBObjectStoreBackendInterface::deleteFunctiuon() becomes IDBDatabaseBackendInterface::deleteFunction(transaction_id, objectstore_id, -1, keyRange); * IDBObjectStoreBackendInterface::clear() becomes IDBDatabaseBackendInterface::clear(transaction_id, objectstore_id); * IDBObjectStoreBackendInterface::setIndexKeys() becomes IDBDatabaseBackendInterface::setIndexKeys(transaction_id, objectstore_id, index_ids, index_keys, ...); * IDBObjectStoreBackendInterface::setIndexesReady() becomes IDBDatabaseBackendInterface::setIndexesReady(transaction_id, objectstore_id, index_ids); This bug does not cover: * IDBObjectStoreBackendInterface::createIndex() * IDBObjectStoreBackendInterface::deleteIndex() (I'm leaving openKeyCursor in here for now, even though it isn't yet implemented in the IDL or in the spec)
[oops, wrong bug: ignore that comment 1]
Created attachment 176310 [details] Patch
jsbell@ / dgrogan@ - a quick look before passing this along to tony?
Comment on attachment 176310 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=176310&action=review > Source/WebCore/Modules/indexeddb/IDBDatabase.cpp:80 > + static int64_t currentTransactionId = 0; This needs to be made thread-safe. A worker thread can race with the main thread here. You might need AtomicallyInitializedStatic and atomicIncrement. > Source/WebCore/Modules/indexeddb/IDBTransaction.h:73 > + int64_t id() const; Does anything use this or m_id? I guess they will be used when backend() and m_backend are deleted?
Created attachment 176323 [details] Patch
tony@ - r? (this can't land until chrome is updated, which can't happen till the next webkit roll, that's why EWS is flailing)
Created attachment 176585 [details] Patch for landing
Comment on attachment 176585 [details] Patch for landing Clearing flags on attachment: 176585 Committed r136071: <http://trac.webkit.org/changeset/136071>
All reviewed patches have been landed. Closing bug.