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

Unified Diff: Source/core/dom/ContextDestructionObserver.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/dom/ContextDestructionObserver.h ('k') | Source/core/dom/ContextLifecycleNotifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContextDestructionObserver.cpp
diff --git a/Source/core/dom/ContextDestructionObserver.cpp b/Source/core/dom/ContextDestructionObserver.cpp
index db2b38bd240465385f936fe5f231e1e579a780e1..6750d80d7c92f2aedfd11e791863f624b66bbc14 100644
--- a/Source/core/dom/ContextDestructionObserver.cpp
+++ b/Source/core/dom/ContextDestructionObserver.cpp
@@ -31,30 +31,29 @@
namespace WebCore {
-ContextDestructionObserver::ContextDestructionObserver(ScriptExecutionContext* scriptExecutionContext, Type type)
+ContextDestructionObserver::ContextDestructionObserver(ScriptExecutionContext* scriptExecutionContext)
: m_scriptExecutionContext(0)
{
- observeContext(scriptExecutionContext, type);
+ observeContext(scriptExecutionContext);
}
ContextDestructionObserver::~ContextDestructionObserver()
{
- if (m_scriptExecutionContext)
- observeContext(0, GenericType);
+ observeContext(0);
}
-void ContextDestructionObserver::observeContext(ScriptExecutionContext* scriptExecutionContext, Type as)
+void ContextDestructionObserver::observeContext(ScriptExecutionContext* scriptExecutionContext)
{
if (m_scriptExecutionContext) {
ASSERT(m_scriptExecutionContext->isContextThread());
- m_scriptExecutionContext->wasUnobservedBy(this, as);
+ m_scriptExecutionContext->willDestroyDestructionObserver(this);
}
m_scriptExecutionContext = scriptExecutionContext;
if (m_scriptExecutionContext) {
ASSERT(m_scriptExecutionContext->isContextThread());
- m_scriptExecutionContext->wasObservedBy(this, as);
+ m_scriptExecutionContext->didCreateDestructionObserver(this);
}
}
« no previous file with comments | « Source/core/dom/ContextDestructionObserver.h ('k') | Source/core/dom/ContextLifecycleNotifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698