本文整理汇总了C++中UniqueIDBDatabaseTransaction类的典型用法代码示例。如果您正苦于以下问题:C++ UniqueIDBDatabaseTransaction类的具体用法?C++ UniqueIDBDatabaseTransaction怎么用?C++ UniqueIDBDatabaseTransaction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UniqueIDBDatabaseTransaction类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: unregisterTransaction
void IDBServer::unregisterTransaction(UniqueIDBDatabaseTransaction& transaction)
{
ASSERT(m_transactions.contains(transaction.info().identifier()));
ASSERT(m_transactions.get(transaction.info().identifier()) == &transaction);
m_transactions.remove(transaction.info().identifier());
}
开发者ID:josecu,项目名称:webkit,代码行数:7,代码来源:IDBServer.cpp
示例2: abortTransactionWithoutCallback
void UniqueIDBDatabaseConnection::abortTransactionWithoutCallback(UniqueIDBDatabaseTransaction& transaction)
{
ASSERT(m_transactionMap.contains(transaction.info().identifier()));
auto takenTransaction = m_transactionMap.take(transaction.info().identifier());
m_database.abortTransaction(*takenTransaction, [](const IDBError&) { });
}
开发者ID:emutavchi,项目名称:WebKitForWayland,代码行数:7,代码来源:UniqueIDBDatabaseConnection.cpp
示例3: abortTransactionWithoutCallback
void UniqueIDBDatabaseConnection::abortTransactionWithoutCallback(UniqueIDBDatabaseTransaction& transaction)
{
ASSERT(m_transactionMap.contains(transaction.info().identifier()));
const auto& transactionIdentifier = transaction.info().identifier();
RefPtr<UniqueIDBDatabaseConnection> protectedThis(this);
m_database.abortTransaction(transaction, [this, protectedThis, transactionIdentifier](const IDBError&) {
ASSERT(m_transactionMap.contains(transactionIdentifier));
m_transactionMap.remove(transactionIdentifier);
});
}
开发者ID:xiejinfeng850414,项目名称:webkit,代码行数:12,代码来源:UniqueIDBDatabaseConnection.cpp
示例4: commitTransaction
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()));
}
开发者ID:nicroto,项目名称:webkit,代码行数:17,代码来源:UniqueIDBDatabase.cpp
示例5: abortTransaction
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()));
}
开发者ID:nicroto,项目名称:webkit,代码行数:10,代码来源:UniqueIDBDatabase.cpp
示例6: didCommitTransaction
void UniqueIDBDatabaseConnection::didCommitTransaction(UniqueIDBDatabaseTransaction& transaction, const IDBError& error)
{
LOG(IndexedDB, "UniqueIDBDatabaseConnection::didCommitTransaction");
auto transactionIdentifier = transaction.info().identifier();
ASSERT(m_transactionMap.contains(transactionIdentifier));
m_transactionMap.remove(transactionIdentifier);
m_connectionToClient.didCommitTransaction(transactionIdentifier, error);
}
开发者ID:emutavchi,项目名称:WebKitForWayland,代码行数:11,代码来源:UniqueIDBDatabaseConnection.cpp
示例7: didCommitTransaction
void UniqueIDBDatabaseConnection::didCommitTransaction(UniqueIDBDatabaseTransaction& transaction, const IDBError& error)
{
LOG(IndexedDB, "UniqueIDBDatabaseConnection::didCommitTransaction - %s - %" PRIu64, m_openRequestIdentifier.loggingString().utf8().data(), m_identifier);
auto transactionIdentifier = transaction.info().identifier();
ASSERT(m_transactionMap.contains(transactionIdentifier));
m_transactionMap.remove(transactionIdentifier);
m_connectionToClient.didCommitTransaction(transactionIdentifier, error);
}
开发者ID:xiejinfeng850414,项目名称:webkit,代码行数:11,代码来源:UniqueIDBDatabaseConnection.cpp
示例8: didAbortTransaction
void UniqueIDBDatabaseConnection::didAbortTransaction(UniqueIDBDatabaseTransaction& transaction, const IDBError& error)
{
LOG(IndexedDB, "UniqueIDBDatabaseConnection::didAbortTransaction - %s - %" PRIu64, m_openRequestIdentifier.loggingString().utf8().data(), m_identifier);
auto transactionIdentifier = transaction.info().identifier();
auto takenTransaction = m_transactionMap.take(transactionIdentifier);
ASSERT(takenTransaction || m_database.hardClosedForUserDelete());
if (takenTransaction)
m_connectionToClient.didAbortTransaction(transactionIdentifier, error);
}
开发者ID:xiejinfeng850414,项目名称:webkit,代码行数:11,代码来源:UniqueIDBDatabaseConnection.cpp
示例9: registerTransaction
void IDBServer::registerTransaction(UniqueIDBDatabaseTransaction& transaction)
{
ASSERT(!m_transactions.contains(transaction.info().identifier()));
m_transactions.set(transaction.info().identifier(), &transaction);
}
开发者ID:josecu,项目名称:webkit,代码行数:5,代码来源:IDBServer.cpp
示例10: LOG
void UniqueIDBDatabase::activateTransactionInBackingStore(UniqueIDBDatabaseTransaction& transaction)
{
LOG(IndexedDB, "(main) UniqueIDBDatabase::activateTransactionInBackingStore");
RefPtr<UniqueIDBDatabase> self(this);
RefPtr<UniqueIDBDatabaseTransaction> refTransaction(&transaction);
auto callback = [this, self, refTransaction](const IDBError& error) {
refTransaction->didActivateInBackingStore(error);
};
uint64_t callbackID = storeCallback(callback);
m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performActivateTransactionInBackingStore, callbackID, transaction.info()));
}
开发者ID:nicroto,项目名称:webkit,代码行数:14,代码来源:UniqueIDBDatabase.cpp
示例11: createIndex
void UniqueIDBDatabase::createIndex(UniqueIDBDatabaseTransaction& transaction, const IDBIndexInfo& info, ErrorCallback callback)
{
ASSERT(isMainThread());
LOG(IndexedDB, "(main) UniqueIDBDatabase::createIndex");
uint64_t callbackID = storeCallback(callback);
m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performCreateIndex, callbackID, transaction.info().identifier(), info));
}
开发者ID:nicroto,项目名称:webkit,代码行数:8,代码来源:UniqueIDBDatabase.cpp
示例12: clearObjectStore
void UniqueIDBDatabase::clearObjectStore(UniqueIDBDatabaseTransaction& transaction, uint64_t objectStoreIdentifier, ErrorCallback callback)
{
ASSERT(isMainThread());
LOG(IndexedDB, "(main) UniqueIDBDatabase::clearObjectStore");
uint64_t callbackID = storeCallback(callback);
m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performClearObjectStore, callbackID, transaction.info().identifier(), objectStoreIdentifier));
}
开发者ID:nicroto,项目名称:webkit,代码行数:8,代码来源:UniqueIDBDatabase.cpp
注:本文中的UniqueIDBDatabaseTransaction类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论