RESOLVED FIXED102732
IndexedDB: Change frontend to call IDBDatabaseBackendInterface::createTransaction()
https://bugs.webkit.org/show_bug.cgi?id=102732
Summary IndexedDB: Change frontend to call IDBDatabaseBackendInterface::createTransac...
Alec Flett
Reported 2012-11-19 16:11:38 PST
Part of the transaction id refactor In IDBDatabase::transaction, make sure we call IDBDatabaseBackend::createTransaction() rather than transaction()
Attachments
Patch (10.81 KB, patch)
2012-11-27 11:39 PST, Alec Flett
no flags
Patch (11.12 KB, patch)
2012-11-27 12:20 PST, Alec Flett
no flags
Patch for landing (10.88 KB, patch)
2012-11-28 15:09 PST, Alec Flett
no flags
Alec Flett
Comment 1 2012-11-19 16:42:43 PST
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)
Alec Flett
Comment 2 2012-11-19 16:45:05 PST
[oops, wrong bug: ignore that comment 1]
Alec Flett
Comment 3 2012-11-27 11:39:15 PST
Alec Flett
Comment 4 2012-11-27 11:39:43 PST
jsbell@ / dgrogan@ - a quick look before passing this along to tony?
David Grogan
Comment 5 2012-11-27 12:03:29 PST
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?
Alec Flett
Comment 6 2012-11-27 12:20:21 PST
Alec Flett
Comment 7 2012-11-27 14:13:14 PST
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)
Alec Flett
Comment 8 2012-11-28 15:09:02 PST
Created attachment 176585 [details] Patch for landing
WebKit Review Bot
Comment 9 2012-11-28 15:43:21 PST
Comment on attachment 176585 [details] Patch for landing Clearing flags on attachment: 176585 Committed r136071: <http://trac.webkit.org/changeset/136071>
WebKit Review Bot
Comment 10 2012-11-28 15:43:25 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.