| Index: content/browser/indexed_db/indexed_db_transaction_coordinator.cc
|
| diff --git a/content/browser/indexed_db/indexed_db_transaction_coordinator.cc b/content/browser/indexed_db/indexed_db_transaction_coordinator.cc
|
| index be47624cf4a0d26d637692a959f44e86477e0afe..852eb9dd4bc9b507f72c7381dcf65e967c401e6c 100644
|
| --- a/content/browser/indexed_db/indexed_db_transaction_coordinator.cc
|
| +++ b/content/browser/indexed_db/indexed_db_transaction_coordinator.cc
|
| @@ -28,7 +28,7 @@ void IndexedDBTransactionCoordinator::DidCreateTransaction(
|
| }
|
|
|
| void IndexedDBTransactionCoordinator::DidFinishTransaction(
|
| - scoped_refptr<IndexedDBTransaction> transaction) {
|
| + IndexedDBTransaction* transaction) {
|
| if (queued_transactions_.count(transaction)) {
|
| DCHECK(!started_transactions_.count(transaction));
|
| queued_transactions_.erase(transaction);
|
| @@ -40,6 +40,13 @@ void IndexedDBTransactionCoordinator::DidFinishTransaction(
|
| ProcessQueuedTransactions();
|
| }
|
|
|
| +bool IndexedDBTransactionCoordinator::IsRunningVersionChangeTransaction()
|
| + const {
|
| + return !started_transactions_.empty() &&
|
| + (*started_transactions_.begin())->mode() ==
|
| + indexed_db::TRANSACTION_VERSION_CHANGE;
|
| +}
|
| +
|
| #ifndef NDEBUG
|
| // Verifies internal consistency while returning whether anything is found.
|
| bool IndexedDBTransactionCoordinator::IsActive(
|
| @@ -77,9 +84,7 @@ void IndexedDBTransactionCoordinator::ProcessQueuedTransactions() {
|
| if (queued_transactions_.empty())
|
| return;
|
|
|
| - DCHECK(started_transactions_.empty() ||
|
| - (*started_transactions_.begin())->mode() !=
|
| - indexed_db::TRANSACTION_VERSION_CHANGE);
|
| + DCHECK(!IsRunningVersionChangeTransaction());
|
|
|
| // The locked_scope set accumulates the ids of object stores in the scope of
|
| // running read/write transactions. Other read-write transactions with
|
|
|