| Index: third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
|
| diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
|
| index 7efb5056a6ec0411888cf7f1faa27a85436c41f2..577a2247f30408d2e1461d12038ba07b53e88c95 100644
|
| --- a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
|
| +++ b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
|
| @@ -41,12 +41,25 @@
|
| #include "modules/indexeddb/IDBOpenDBRequest.h"
|
| #include "modules/indexeddb/IDBTracing.h"
|
| #include "wtf/PtrUtil.h"
|
| +
|
| #include <memory>
|
|
|
| using blink::WebIDBDatabase;
|
|
|
| namespace blink {
|
|
|
| +IDBTransaction* IDBTransaction::createObserver(
|
| + ExecutionContext* executionContext,
|
| + int64_t id,
|
| + const HashSet<String>& scope,
|
| + IDBDatabase* db) {
|
| + DCHECK(!scope.isEmpty()) << "Observer transactions should operate on a "
|
| + "well-defined set of stores";
|
| + IDBTransaction* transaction =
|
| + new IDBTransaction(executionContext, id, scope, db);
|
| + return transaction;
|
| +}
|
| +
|
| IDBTransaction* IDBTransaction::createNonVersionChange(
|
| ScriptState* scriptState,
|
| int64_t id,
|
| @@ -92,6 +105,24 @@ class DeactivateTransactionTask : public V8PerIsolateData::EndOfScopeTask {
|
|
|
| } // namespace
|
|
|
| +IDBTransaction::IDBTransaction(ExecutionContext* executionContext,
|
| + int64_t id,
|
| + const HashSet<String>& scope,
|
| + IDBDatabase* db)
|
| + : ContextLifecycleObserver(executionContext),
|
| + m_id(id),
|
| + m_database(db),
|
| + m_mode(WebIDBTransactionModeReadOnly),
|
| + m_scope(scope),
|
| + m_state(Active) {
|
| + DCHECK(m_database);
|
| + DCHECK(!m_scope.isEmpty()) << "Observer transactions must operate "
|
| + "on a well-defined set of stores";
|
| +
|
| + DCHECK_EQ(m_state, Active);
|
| + m_database->transactionCreated(this);
|
| +}
|
| +
|
| IDBTransaction::IDBTransaction(ScriptState* scriptState,
|
| int64_t id,
|
| const HashSet<String>& scope,
|
|
|