Index: Source/modules/webdatabase/DatabaseContext.cpp |
diff --git a/Source/modules/webdatabase/DatabaseContext.cpp b/Source/modules/webdatabase/DatabaseContext.cpp |
index 456087abd8cf1966d3cf3df6aa1164b1affae824..3e967700ac3fc79586b2b4c6f8cc2e29457d3f04 100644 |
--- a/Source/modules/webdatabase/DatabaseContext.cpp |
+++ b/Source/modules/webdatabase/DatabaseContext.cpp |
@@ -178,10 +178,9 @@ void DatabaseContext::stopDatabases() |
// DatabaseThread. |
if (m_databaseThread && !m_hasRequestedTermination) { |
- TaskSynchronizer sync; |
- m_databaseThread->requestTermination(&sync); |
+ // This blocks until the database thread finishes processing the cleanup task. |
+ m_databaseThread->terminate(); |
m_hasRequestedTermination = true; |
- sync.waitForTaskCompletion(); |
} |
} |