void UniqueIDBDatabase::abortTransaction(UniqueIDBDatabaseTransaction& transaction, ErrorCallback callback) { ASSERT(isMainThread()); LOG(IndexedDB, "(main) UniqueIDBDatabase::abortTransaction"); ASSERT(&transaction.databaseConnection().database() == this); uint64_t callbackID = storeCallback(callback); m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performAbortTransaction, callbackID, transaction.info().identifier())); }
void UniqueIDBDatabase::commitTransaction(UniqueIDBDatabaseTransaction& transaction, ErrorCallback callback) { ASSERT(isMainThread()); LOG(IndexedDB, "(main) UniqueIDBDatabase::commitTransaction"); ASSERT(&transaction.databaseConnection().database() == this); if (m_versionChangeTransaction == &transaction) { ASSERT(&m_versionChangeTransaction->databaseConnection() == m_versionChangeDatabaseConnection); m_databaseInfo->setVersion(transaction.info().newVersion()); m_versionChangeTransaction = nullptr; m_versionChangeDatabaseConnection = nullptr; } uint64_t callbackID = storeCallback(callback); m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performCommitTransaction, callbackID, transaction.info().identifier())); }