Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(999)

Unified Diff: content/browser/indexed_db/indexed_db_database.cc

Issue 24702002: IndexedDB: Ignore duplicate transaction IDs sent by renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_database.cc
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc
index f0c05a58015a54de9491fcb274da8660fa8a6604..7980be511d352098c7de37fbd961c526796a8493 100644
--- a/content/browser/indexed_db/indexed_db_database.cc
+++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -1398,6 +1398,9 @@ void IndexedDBDatabase::CreateTransaction(
uint16 mode) {
DCHECK(connections_.has(connection));
+ DCHECK(transactions_.find(transaction_id) == transactions_.end());
+ if (transactions_.find(transaction_id) != transactions_.end())
+ return;
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
transaction_id,
@@ -1405,7 +1408,6 @@ void IndexedDBDatabase::CreateTransaction(
std::set<int64>(object_store_ids.begin(), object_store_ids.end()),
static_cast<indexed_db::TransactionMode>(mode),
this);
- DCHECK(transactions_.find(transaction_id) == transactions_.end());
transactions_[transaction_id] = transaction;
}
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698