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

Unified Diff: Source/modules/webdatabase/SQLTransactionCoordinator.cpp

Issue 167123002: Simpler return value from HashTable::add()/HashMap::add() and others (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 | « Source/modules/webdatabase/QuotaTracker.cpp ('k') | Source/platform/exported/WebHTTPLoadInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/SQLTransactionCoordinator.cpp
diff --git a/Source/modules/webdatabase/SQLTransactionCoordinator.cpp b/Source/modules/webdatabase/SQLTransactionCoordinator.cpp
index 7d9cfdf69bae704651a5cc5690d2d1653df9cd94..ae353e0372f98f3933333abc7244e1beb3e9db9c 100644
--- a/Source/modules/webdatabase/SQLTransactionCoordinator.cpp
+++ b/Source/modules/webdatabase/SQLTransactionCoordinator.cpp
@@ -77,12 +77,15 @@ void SQLTransactionCoordinator::acquireLock(SQLTransactionBackend* transaction)
CoordinationInfoMap::iterator coordinationInfoIterator = m_coordinationInfoMap.find(dbIdentifier);
if (coordinationInfoIterator == m_coordinationInfoMap.end()) {
// No pending transactions for this DB
- coordinationInfoIterator = m_coordinationInfoMap.add(dbIdentifier, CoordinationInfo()).iterator;
+ CoordinationInfo& info = m_coordinationInfoMap.add(dbIdentifier, CoordinationInfo()).storedValue->value;
+ info.pendingTransactions.append(transaction);
+ processPendingTransactions(info);
+ } else {
+ CoordinationInfo& info = coordinationInfoIterator->value;
+ info.pendingTransactions.append(transaction);
+ processPendingTransactions(info);
}
- CoordinationInfo& info = coordinationInfoIterator->value;
- info.pendingTransactions.append(transaction);
- processPendingTransactions(info);
}
void SQLTransactionCoordinator::releaseLock(SQLTransactionBackend* transaction)
« no previous file with comments | « Source/modules/webdatabase/QuotaTracker.cpp ('k') | Source/platform/exported/WebHTTPLoadInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698