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

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

Issue 913413002: DatabaseManager::terminateDatabaseThread should handle multiple DatabaseContexts. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove isEmpty check Created 5 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/DatabaseManager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/DatabaseManager.cpp
diff --git a/Source/modules/webdatabase/DatabaseManager.cpp b/Source/modules/webdatabase/DatabaseManager.cpp
index 5854cee9cf4a0be9c8ea672247ba479677eee7cc..7156e08b446a3e68acc2320b66c6aebabd4bda4f 100644
--- a/Source/modules/webdatabase/DatabaseManager.cpp
+++ b/Source/modules/webdatabase/DatabaseManager.cpp
@@ -57,11 +57,10 @@ DatabaseManager& DatabaseManager::manager()
void DatabaseManager::terminateDatabaseThread()
{
ASSERT(isMainThread());
- if (!s_databaseManager || s_databaseManager->m_contextMap.isEmpty())
+ if (!s_databaseManager)
return;
- // We have at most one DatabaseContext, which is for the main thread.
- ASSERT(s_databaseManager->m_contextMap.size() == 1);
- (*s_databaseManager->m_contextMap.values().begin())->stopDatabases();
+ for (const Member<DatabaseContext>& context : s_databaseManager->m_contextMap.values())
+ context->stopDatabases();
}
DatabaseManager::DatabaseManager()
« no previous file with comments | « Source/modules/webdatabase/DatabaseManager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698