From 1847c3ea3a8a43eed6957f03447eb3d275945f7b Mon Sep 17 00:00:00 2001 From: "jsbell@chromium.org" Date: Mon, 9 Dec 2013 20:50:17 +0000 Subject: IndexedDB: Timeout transactions if front-end is unresponsive Introduce a fixed time-out that limits how long a transaction will wait after it handles the last request before it gives up and aborts. This is to prevent "wedged" renderers (not crashed but not turning the event loop, etc) from holding up the transaction queue since they never issue a another request or ask to commit. (TBR for new file entry in gypi) BUG=318992 R=dgrogam TBR=jam Review URL: https://codereview.chromium.org/67173010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239543 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/indexed_db/indexed_db_database.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to '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 258b01e..11ef4be 100644 --- a/content/browser/indexed_db/indexed_db_database.cc +++ b/content/browser/indexed_db/indexed_db_database.cc @@ -1402,8 +1402,14 @@ void IndexedDBDatabase::CreateTransaction( connection->callbacks(), std::set(object_store_ids.begin(), object_store_ids.end()), static_cast(mode), - this); - transactions_[transaction_id] = transaction; + this, + new IndexedDBBackingStore::Transaction(backing_store_)); + TransactionCreated(transaction); +} + +void IndexedDBDatabase::TransactionCreated( + scoped_refptr transaction) { + transactions_[transaction->id()] = transaction; } bool IndexedDBDatabase::IsOpenConnectionBlocked() const { -- cgit v1.1