Chromium Code Reviews| 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..6e72e36bd19f28a1462eb872bae2e0eb94243354 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::NewObserverTransactionId() { |
| + // When we overflow to 0, reset the ID to 1 (id of 0 is reserved for upgrade |
| + // transactions). |
| + if (next_observer_transaction_id_ == 0) |
| + next_observer_transaction_id_ = 1; |
| + return static_cast<int64_t>(next_observer_transaction_id_++) << 32; |
|
palmer
2017/01/18 19:56:01
Yeah, here is a place where that struct would resu
dmurph
2017/01/18 21:00:57
Acknowledged.
|
| +} |
| + |
| } // namespace content |