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

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

Issue 180163010: IndexedDB: Don't timeout read-only transactions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Abort the transaction to avoid leaks Created 6 years, 9 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_transaction_unittest.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_transaction.cc
diff --git a/content/browser/indexed_db/indexed_db_transaction.cc b/content/browser/indexed_db/indexed_db_transaction.cc
index 91a851f21eea2004ee295c9b30a1bf9e717df695..ff7ba2b5bd9a9509ee6cf3d085763a1d3dde7270 100644
--- a/content/browser/indexed_db/indexed_db_transaction.cc
+++ b/content/browser/indexed_db/indexed_db_transaction.cc
@@ -318,11 +318,14 @@ void IndexedDBTransaction::ProcessTaskQueue() {
return;
// Otherwise, start a timer in case the front-end gets wedged and
- // never requests further activity.
- timeout_timer_.Start(
- FROM_HERE,
- base::TimeDelta::FromSeconds(kInactivityTimeoutPeriodSeconds),
- base::Bind(&IndexedDBTransaction::Timeout, this));
+ // never requests further activity. Read-only transactions don't
+ // block other transactions, so don't time those out.
+ if (mode_ != indexed_db::TRANSACTION_READ_ONLY) {
+ timeout_timer_.Start(
+ FROM_HERE,
+ base::TimeDelta::FromSeconds(kInactivityTimeoutPeriodSeconds),
+ base::Bind(&IndexedDBTransaction::Timeout, this));
+ }
}
void IndexedDBTransaction::Timeout() {
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698