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

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

Issue 593423002: Revert of DatabaseBackend should not post a task to an already terminated database thread (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. 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/DatabaseContext.h ('k') | Source/modules/webdatabase/DatabaseTask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/DatabaseContext.cpp
diff --git a/Source/modules/webdatabase/DatabaseContext.cpp b/Source/modules/webdatabase/DatabaseContext.cpp
index b47426087f34c3de5eac6b5fb202ab6bcdc0cca9..456087abd8cf1966d3cf3df6aa1164b1affae824 100644
--- a/Source/modules/webdatabase/DatabaseContext.cpp
+++ b/Source/modules/webdatabase/DatabaseContext.cpp
@@ -165,11 +165,6 @@
return m_databaseThread.get();
}
-bool DatabaseContext::databaseThreadAvailable()
-{
- return m_databaseThread && !m_hasRequestedTermination;
-}
-
void DatabaseContext::stopDatabases()
{
// Though we initiate termination of the DatabaseThread here in
@@ -182,7 +177,7 @@
// m_databaseThread RefPtr destructor will deref and delete the
// DatabaseThread.
- if (databaseThreadAvailable()) {
+ if (m_databaseThread && !m_hasRequestedTermination) {
TaskSynchronizer sync;
m_databaseThread->requestTermination(&sync);
m_hasRequestedTermination = true;
« no previous file with comments | « Source/modules/webdatabase/DatabaseContext.h ('k') | Source/modules/webdatabase/DatabaseTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698