| Index: Source/modules/webdatabase/DatabaseContext.cpp
|
| diff --git a/Source/modules/webdatabase/DatabaseContext.cpp b/Source/modules/webdatabase/DatabaseContext.cpp
|
| index 349c6f8938a998987cfd09a20592f054de96e86d..389b5c96ad90acd3b128ddcc20164f86b9b541f4 100644
|
| --- a/Source/modules/webdatabase/DatabaseContext.cpp
|
| +++ b/Source/modules/webdatabase/DatabaseContext.cpp
|
| @@ -131,7 +131,15 @@ DatabaseContext::~DatabaseContext()
|
| void DatabaseContext::contextDestroyed()
|
| {
|
| stopDatabases();
|
| - ActiveDOMObject::contextDestroyed();
|
| +
|
| + // Normally, willDestroyActiveDOMObject() is called in ~ActiveDOMObject().
|
| + // However, we're here because the destructor hasn't been called, and the
|
| + // ScriptExecutionContext we're associated with is about to be destructed.
|
| + // So, go ahead an unregister self from the ActiveDOMObject list, and
|
| + // set m_scriptExecutionContext to 0 so that ~ActiveDOMObject() doesn't
|
| + // try to do so again.
|
| + m_scriptExecutionContext->willDestroyActiveDOMObject(this);
|
| + m_scriptExecutionContext = 0;
|
| }
|
|
|
| // stop() is from stopActiveDOMObjects() which indicates that the owner Frame
|
|
|