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

Unified Diff: Source/core/inspector/AsyncCallChainMap.h

Issue 858173002: DevTools: rename AsyncCallChainMap to AsyncOperationMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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/bindings/core/v8/ScriptDebugServer.h ('k') | Source/core/inspector/AsyncCallTracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/bindings/core/v8/ScriptDebugServer.h ('k') | Source/core/inspector/AsyncCallTracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698