本文整理汇总了C++中IDBTransaction::info方法的典型用法代码示例。如果您正苦于以下问题:C++ IDBTransaction::info方法的具体用法?C++ IDBTransaction::info怎么用?C++ IDBTransaction::info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDBTransaction
的用法示例。
在下文中一共展示了IDBTransaction::info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: willAbortTransaction
void IDBDatabase::willAbortTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBDatabase::willAbortTransaction");
auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
ASSERT(refTransaction);
m_abortingTransactions.set(transaction.info().identifier(), WTF::move(refTransaction));
}
示例2: willCommitTransaction
void IDBDatabase::willCommitTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBDatabase::willCommitTransaction %s", transaction.info().identifier().loggingString().utf8().data());
auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
ASSERT(refTransaction);
m_committingTransactions.set(transaction.info().identifier(), WTFMove(refTransaction));
}
示例3: didCommitTransaction
void IDBDatabase::didCommitTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBDatabase::didCommitTransaction %s", transaction.info().identifier().loggingString().utf8().data());
if (m_versionChangeTransaction == &transaction)
m_info.setVersion(transaction.info().newVersion());
didCommitOrAbortTransaction(transaction);
}
示例4: abortTransaction
void IDBConnectionToServer::abortTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBConnectionToServer::abortTransaction");
ASSERT(!m_abortingTransactions.contains(transaction.info().identifier()));
m_abortingTransactions.set(transaction.info().identifier(), &transaction);
auto identifier = transaction.info().identifier();
m_delegate->abortTransaction(identifier);
}
示例5: abortTransaction
void IDBConnectionProxy::abortTransaction(IDBTransaction& transaction)
{
{
Locker<Lock> locker(m_transactionMapLock);
ASSERT(!m_abortingTransactions.contains(transaction.info().identifier()));
m_abortingTransactions.set(transaction.info().identifier(), &transaction);
}
callConnectionOnMainThread(&IDBConnectionToServer::abortTransaction, transaction.info().identifier());
}
示例6: willAbortTransaction
void IDBDatabase::willAbortTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBDatabase::willAbortTransaction %s", transaction.info().identifier().loggingString().utf8().data());
auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
ASSERT(refTransaction);
m_abortingTransactions.set(transaction.info().identifier(), WTF::move(refTransaction));
if (transaction.isVersionChange())
m_closePending = true;
}
示例7: didStartTransaction
void IDBDatabase::didStartTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBDatabase::didStartTransaction %s", transaction.info().identifier().loggingString().utf8().data());
ASSERT(!m_versionChangeTransaction);
// It is possible for the client to have aborted a transaction before the server replies back that it has started.
if (m_abortingTransactions.contains(transaction.info().identifier()))
return;
m_activeTransactions.set(transaction.info().identifier(), &transaction);
}
示例8: didCommitOrAbortTransaction
void IDBDatabase::didCommitOrAbortTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBDatabase::didCommitOrAbortTransaction");
if (m_versionChangeTransaction == &transaction)
m_versionChangeTransaction = nullptr;
ASSERT(m_activeTransactions.contains(transaction.info().identifier()) || m_committingTransactions.contains(transaction.info().identifier()));
m_activeTransactions.remove(transaction.info().identifier());
m_committingTransactions.remove(transaction.info().identifier());
}
示例9: hasRecordOfTransaction
bool IDBConnectionProxy::hasRecordOfTransaction(const IDBTransaction& transaction) const
{
ASSERT(m_transactionMapLock.isLocked());
auto identifier = transaction.info().identifier();
return m_pendingTransactions.contains(identifier) || m_committingTransactions.contains(identifier) || m_abortingTransactions.contains(identifier);
}
示例10: didStartTransaction
void IDBDatabase::didStartTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBDatabase::didStartTransaction");
ASSERT(!m_versionChangeTransaction);
m_activeTransactions.set(transaction.info().identifier(), &transaction);
}
示例11: didCommitOrAbortTransaction
void IDBDatabase::didCommitOrAbortTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBDatabase::didCommitOrAbortTransaction %s", transaction.info().identifier().loggingString().utf8().data());
if (m_versionChangeTransaction == &transaction)
m_versionChangeTransaction = nullptr;
#ifndef NDBEBUG
unsigned count = 0;
if (m_activeTransactions.contains(transaction.info().identifier()))
++count;
if (m_committingTransactions.contains(transaction.info().identifier()))
++count;
if (m_abortingTransactions.contains(transaction.info().identifier()))
++count;
ASSERT(count == 1);
#endif
m_activeTransactions.remove(transaction.info().identifier());
m_committingTransactions.remove(transaction.info().identifier());
m_abortingTransactions.remove(transaction.info().identifier());
if (m_closePending)
maybeCloseInServer();
}
示例12: establishTransaction
void IDBConnectionToServer::establishTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBConnectionToServer::establishTransaction");
ASSERT(!hasRecordOfTransaction(transaction));
m_pendingTransactions.set(transaction.info().identifier(), &transaction);
m_delegate->establishTransaction(transaction.database().databaseConnectionIdentifier(), transaction.info());
}
示例13: didCommitTransaction
void IDBDatabase::didCommitTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBDatabase::didCommitTransaction");
if (m_versionChangeTransaction == &transaction)
m_info.setVersion(transaction.info().newVersion());
didCommitOrAbortTransaction(transaction);
}
示例14: establishTransaction
void IDBConnectionProxy::establishTransaction(IDBTransaction& transaction)
{
{
Locker<Lock> locker(m_transactionMapLock);
ASSERT(!hasRecordOfTransaction(transaction));
m_pendingTransactions.set(transaction.info().identifier(), &transaction);
}
callConnectionOnMainThread(&IDBConnectionToServer::establishTransaction, transaction.database().databaseConnectionIdentifier(), transaction.info());
}
示例15: willAbortTransaction
void IDBDatabase::willAbortTransaction(IDBTransaction& transaction)
{
LOG(IndexedDB, "IDBDatabase::willAbortTransaction %s", transaction.info().identifier().loggingString().utf8().data());
ASSERT(&originThread() == &Thread::current());
auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
if (!refTransaction)
refTransaction = m_committingTransactions.take(transaction.info().identifier());
ASSERT(refTransaction);
m_abortingTransactions.set(transaction.info().identifier(), WTFMove(refTransaction));
if (transaction.isVersionChange()) {
ASSERT(transaction.originalDatabaseInfo());
m_info = *transaction.originalDatabaseInfo();
m_closePending = true;
}
}