Index: Source/core/inspector/AsyncCallChainMap.h |
diff --git a/Source/core/inspector/AsyncCallChainMap.h b/Source/core/inspector/AsyncCallChainMap.h |
deleted file mode 100644 |
index 14e6f77b546c9bf6e03b8ad63291b28fcabfbef6..0000000000000000000000000000000000000000 |
--- a/Source/core/inspector/AsyncCallChainMap.h |
+++ /dev/null |
@@ -1,91 +0,0 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#ifndef AsyncCallChainMap_h |
-#define AsyncCallChainMap_h |
- |
-#include "core/inspector/AsyncCallChain.h" |
-#include "core/inspector/InspectorDebuggerAgent.h" |
-#include "platform/heap/Handle.h" |
-#include "wtf/HashMap.h" |
-#include "wtf/PassRefPtr.h" |
-#include "wtf/RefPtr.h" |
- |
-namespace blink { |
- |
-template <class K> |
-class AsyncCallChainMap final { |
- ALLOW_ONLY_INLINE_ALLOCATION(); |
-public: |
- using MapType = WillBeHeapHashMap<K, int>; |
- explicit AsyncCallChainMap(InspectorDebuggerAgent* debuggerAgent) |
- : m_debuggerAgent(debuggerAgent) |
- { |
- } |
- |
- ~AsyncCallChainMap() |
- { |
- // Verify that this object has been explicitly disposed. |
- ASSERT(hasBeenDisposed()); |
- } |
- |
-#if ENABLE(ASSERT) |
- bool hasBeenDisposed() const |
- { |
- return !m_debuggerAgent; |
- } |
-#endif |
- |
- void dispose() |
- { |
- clear(); |
- m_debuggerAgent = nullptr; |
- } |
- |
- void clear() |
- { |
- ASSERT(m_debuggerAgent); |
- for (auto it : m_asyncCallChains) |
- m_debuggerAgent->traceAsyncOperationCompleted(it.value); |
- m_asyncCallChains.clear(); |
- } |
- |
- void set(typename MapType::KeyPeekInType key, int operationId) |
- { |
- m_asyncCallChains.set(key, operationId); |
- } |
- |
- bool contains(typename MapType::KeyPeekInType key) const |
- { |
- return m_asyncCallChains.contains(key); |
- } |
- |
- int get(typename MapType::KeyPeekInType key) const |
- { |
- return m_asyncCallChains.get(key); |
- } |
- |
- void remove(typename MapType::KeyPeekInType key) |
- { |
- ASSERT(m_debuggerAgent); |
- int operationId = m_asyncCallChains.take(key); |
- if (operationId) |
- m_debuggerAgent->traceAsyncOperationCompleted(operationId); |
- } |
- |
- void trace(Visitor* visitor) |
- { |
- visitor->trace(m_debuggerAgent); |
- visitor->trace(m_asyncCallChains); |
- } |
- |
-private: |
- RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; |
- MapType m_asyncCallChains; |
-}; |
- |
-} // namespace blink |
- |
- |
-#endif // AsyncCallChainMap_h |