本文整理汇总了C++中IDBTransaction::suspendIfNeeded方法的典型用法代码示例。如果您正苦于以下问题:C++ IDBTransaction::suspendIfNeeded方法的具体用法?C++ IDBTransaction::suspendIfNeeded怎么用?C++ IDBTransaction::suspendIfNeeded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDBTransaction
的用法示例。
在下文中一共展示了IDBTransaction::suspendIfNeeded方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create
IDBTransaction* IDBTransaction::create(ScriptState* scriptState, int64_t id, const HashSet<String>& objectStoreNames, WebIDBTransactionMode mode, IDBDatabase* db)
{
IDBOpenDBRequest* openDBRequest = nullptr;
IDBTransaction* transaction = new IDBTransaction(scriptState, id, objectStoreNames, mode, db, openDBRequest, IDBDatabaseMetadata());
transaction->suspendIfNeeded();
return transaction;
}
示例2: create
IDBTransaction* IDBTransaction::create(ExecutionContext* context, int64_t id, const Vector<String>& objectStoreNames, WebIDBDatabase::TransactionMode mode, IDBDatabase* db)
{
IDBOpenDBRequest* openDBRequest = 0;
IDBTransaction* transaction = adoptRefCountedGarbageCollected(new IDBTransaction(context, id, objectStoreNames, mode, db, openDBRequest, IDBDatabaseMetadata()));
transaction->suspendIfNeeded();
return transaction;
}
示例3: createVersionChange
IDBTransaction* IDBTransaction::createVersionChange(
ExecutionContext* executionContext,
int64_t id,
IDBDatabase* db,
IDBOpenDBRequest* openDBRequest,
const IDBDatabaseMetadata& oldMetadata) {
IDBTransaction* transaction =
new IDBTransaction(executionContext, id, db, openDBRequest, oldMetadata);
transaction->suspendIfNeeded();
return transaction;
}
示例4: createNonVersionChange
IDBTransaction* IDBTransaction::createNonVersionChange(
ScriptState* scriptState,
int64_t id,
const HashSet<String>& scope,
WebIDBTransactionMode mode,
IDBDatabase* db) {
DCHECK_NE(mode, WebIDBTransactionModeVersionChange);
DCHECK(!scope.isEmpty()) << "Non-version transactions should operate on a "
"well-defined set of stores";
IDBTransaction* transaction =
new IDBTransaction(scriptState, id, scope, mode, db);
transaction->suspendIfNeeded();
return transaction;
}