summaryrefslogtreecommitdiffstats
path: root/content/browser/indexed_db/indexed_db_database.cc
diff options
context:
space:
mode:
authorjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-09 20:50:17 +0000
committerjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-09 20:50:17 +0000
commit1847c3ea3a8a43eed6957f03447eb3d275945f7b (patch)
tree09a290ba71e4a39b926bb0562c988b9e73b86ded /content/browser/indexed_db/indexed_db_database.cc
parenta8573003348a043b80a62a28cbb8f67a37b092b3 (diff)
downloadchromium_src-1847c3ea3a8a43eed6957f03447eb3d275945f7b.zip
chromium_src-1847c3ea3a8a43eed6957f03447eb3d275945f7b.tar.gz
chromium_src-1847c3ea3a8a43eed6957f03447eb3d275945f7b.tar.bz2
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
Diffstat (limited to 'content/browser/indexed_db/indexed_db_database.cc')
-rw-r--r--content/browser/indexed_db/indexed_db_database.cc10
1 files changed, 8 insertions, 2 deletions
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<int64>(object_store_ids.begin(), object_store_ids.end()),
static_cast<indexed_db::TransactionMode>(mode),
- this);
- transactions_[transaction_id] = transaction;
+ this,
+ new IndexedDBBackingStore::Transaction(backing_store_));
+ TransactionCreated(transaction);
+}
+
+void IndexedDBDatabase::TransactionCreated(
+ scoped_refptr<IndexedDBTransaction> transaction) {
+ transactions_[transaction->id()] = transaction;
}
bool IndexedDBDatabase::IsOpenConnectionBlocked() const {