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

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

Issue 16988003: Revert "Extract ContextLifecycleNotifier from ScriptExecutionContext." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/core/workers/WorkerContext.cpp ('k') | no next file » | 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 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
« no previous file with comments | « Source/core/workers/WorkerContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698