Chromium Code Reviews| Index: Source/modules/webdatabase/DatabaseContext.cpp |
| diff --git a/Source/modules/webdatabase/DatabaseContext.cpp b/Source/modules/webdatabase/DatabaseContext.cpp |
| index 456087abd8cf1966d3cf3df6aa1164b1affae824..b47426087f34c3de5eac6b5fb202ab6bcdc0cca9 100644 |
| --- a/Source/modules/webdatabase/DatabaseContext.cpp |
| +++ b/Source/modules/webdatabase/DatabaseContext.cpp |
| @@ -165,6 +165,11 @@ DatabaseThread* DatabaseContext::databaseThread() |
| return m_databaseThread.get(); |
| } |
| +bool DatabaseContext::databaseThreadAvailable() |
| +{ |
| + return m_databaseThread && !m_hasRequestedTermination; |
|
haraken
2014/09/24 10:51:56
The only suspicious change is here. In order to pr
|
| +} |
| + |
| void DatabaseContext::stopDatabases() |
| { |
| // Though we initiate termination of the DatabaseThread here in |
| @@ -177,7 +182,7 @@ void DatabaseContext::stopDatabases() |
| // m_databaseThread RefPtr destructor will deref and delete the |
| // DatabaseThread. |
| - if (m_databaseThread && !m_hasRequestedTermination) { |
| + if (databaseThreadAvailable()) { |
| TaskSynchronizer sync; |
| m_databaseThread->requestTermination(&sync); |
| m_hasRequestedTermination = true; |