| 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();
|
| }
|
|
|
|
|