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

Unified Diff: Source/core/dom/ActiveDOMObject.cpp

Issue 1266443003: Tidy up ActiveDOMObject destructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ActiveDOMObject.cpp
diff --git a/Source/core/dom/ActiveDOMObject.cpp b/Source/core/dom/ActiveDOMObject.cpp
index e3aee7b2a8d0b402c7be5069599495e5cb6443ba..be89af3a7e88411e5007d9062046e1b46f274038 100644
--- a/Source/core/dom/ActiveDOMObject.cpp
+++ b/Source/core/dom/ActiveDOMObject.cpp
@@ -51,18 +51,11 @@ ActiveDOMObject::~ActiveDOMObject()
if (isMainThread())
InstanceCounters::decrementCounter(InstanceCounters::ActiveDOMObjectCounter);
- // ActiveDOMObject may be inherited by a sub-class whose life-cycle
- // exceeds that of the associated ExecutionContext. In those cases,
- // m_executionContext would/should have been nullified by
- // ContextLifecycleObserver::contextDestroyed() (which we implement /
- // inherit). Hence, we should ensure that this is not 0 before use it
- // here.
- if (!executionContext())
- return;
-
ASSERT(m_suspendIfNeededCalled);
+
+ // Oilpan: not valid to access executionContext() in the destructor.
#if !ENABLE(OILPAN)
- ASSERT(executionContext()->isContextThread());
+ ASSERT(!executionContext() || executionContext()->isContextThread());
#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698