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

Unified Diff: Source/core/inspector/V8AsyncCallTracker.cpp

Issue 818673004: Explicitly dispose of async call chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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/inspector/V8AsyncCallTracker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/V8AsyncCallTracker.cpp
diff --git a/Source/core/inspector/V8AsyncCallTracker.cpp b/Source/core/inspector/V8AsyncCallTracker.cpp
index e6f8c6361a23ac3b40da9cfefd36ecb118551f56..cefc2665abe1408c047192fbb9e51aca04641b73 100644
--- a/Source/core/inspector/V8AsyncCallTracker.cpp
+++ b/Source/core/inspector/V8AsyncCallTracker.cpp
@@ -33,6 +33,11 @@ public:
~V8ContextAsyncCallChains()
{
+ ASSERT(m_v8AsyncCallChains.hasBeenDisposed());
+ }
+
+ void dispose()
+ {
// FIXME: get rid of the dispose method and this class altogether once AsyncCallChainMap is always allocated on C++ heap.
m_v8AsyncCallChains.dispose();
}
@@ -80,8 +85,10 @@ void V8AsyncCallTracker::asyncCallTrackingStateChanged(bool)
void V8AsyncCallTracker::resetAsyncCallChains()
{
- for (auto& it : m_contextAsyncCallChainMap)
+ for (auto& it : m_contextAsyncCallChainMap) {
it.key->removeObserver(this);
+ it.value->dispose();
+ }
m_contextAsyncCallChainMap.clear();
}
« no previous file with comments | « Source/core/inspector/V8AsyncCallTracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698