Chromium Code Reviews

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

Issue 589363002: Oilpan: DatabaseThread::m_thread should not get destructed during sweeping (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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();
}
}
« no previous file with comments | « no previous file | Source/modules/webdatabase/DatabaseThread.h » ('j') | Source/modules/webdatabase/DatabaseThread.cpp » ('J')

Powered by Google App Engine