Index: content/browser/indexed_db/indexed_db_connection.cc |
diff --git a/content/browser/indexed_db/indexed_db_connection.cc b/content/browser/indexed_db/indexed_db_connection.cc |
index 216786a1d365f783f207895b0158fbce7808eab7..5f98d84c6fa3270a28c2a1e1df34a3b4342432bc 100644 |
--- a/content/browser/indexed_db/indexed_db_connection.cc |
+++ b/content/browser/indexed_db/indexed_db_connection.cc |
@@ -158,4 +158,12 @@ void IndexedDBConnection::RemoveTransaction(int64_t id) { |
transactions_.erase(id); |
} |
+int64_t IndexedDBConnection::NextObserverTransactionId() { |
cmumford
2017/01/09 21:31:25
nit: "Next*" might be interpreted as a read-only o
dmurph
2017/01/10 00:17:38
NewObserverTransactionId?
|
+ // If we ever overflow, just reset the ID. |
+ if (next_observer_transaction_id_ == kMaxObserverTransactionId) { |
+ next_observer_transaction_id_ = 1ll << 32; |
+ } |
+ return next_observer_transaction_id_++; |
+} |
+ |
} // namespace content |