| Index: Source/modules/webdatabase/DatabaseThread.cpp
|
| diff --git a/Source/modules/webdatabase/DatabaseThread.cpp b/Source/modules/webdatabase/DatabaseThread.cpp
|
| index 92bd6faaafd082a2364a2d812cd30e194366c29b..c30b10b7d670fbd081cd98464885b06a77d6f5c3 100644
|
| --- a/Source/modules/webdatabase/DatabaseThread.cpp
|
| +++ b/Source/modules/webdatabase/DatabaseThread.cpp
|
| @@ -51,13 +51,7 @@ DatabaseThread::DatabaseThread()
|
| DatabaseThread::~DatabaseThread()
|
| {
|
| ASSERT(m_openDatabaseSet.isEmpty());
|
| - // Oilpan: The database thread must have finished its cleanup tasks before
|
| - // the following clear(). Otherwise, WebThread destructor blocks the caller
|
| - // thread, and causes a deadlock with ThreadState cleanup.
|
| - // DatabaseContext::stop() asks the database thread to close all of
|
| - // databases, and wait until GC heap cleanup of the database thread. So we
|
| - // can safely destruct WebThread here.
|
| - m_thread.clear();
|
| + ASSERT(!m_thread);
|
| }
|
|
|
| void DatabaseThread::trace(Visitor* visitor)
|
| @@ -68,6 +62,14 @@ void DatabaseThread::trace(Visitor* visitor)
|
| #endif
|
| }
|
|
|
| +void DatabaseThread::dispose()
|
| +{
|
| + // Oilpan: The database thread must have finished its cleanup tasks before
|
| + // the following clear(). Otherwise, the WebThread destructor blocks the
|
| + // caller thread, and causes a deadlock with ThreadState cleanup.
|
| + m_thread.clear();
|
| +}
|
| +
|
| void DatabaseThread::start()
|
| {
|
| if (m_thread)
|
|
|