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

Unified Diff: third_party/WebKit/Source/core/inspector/AsyncOperationMap.h

Issue 1601283003: DevTools: deoilpanize inspector/v8 and related classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed. Created 4 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
Index: third_party/WebKit/Source/core/inspector/AsyncOperationMap.h
diff --git a/third_party/WebKit/Source/core/inspector/AsyncOperationMap.h b/third_party/WebKit/Source/core/inspector/AsyncOperationMap.h
deleted file mode 100644
index 0ccc5e6da85a68a16a5bfae6cab37bafc6d92187..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/inspector/AsyncOperationMap.h
+++ /dev/null
@@ -1,89 +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 AsyncOperationMap_h
-#define AsyncOperationMap_h
-
-#include "core/inspector/v8/V8DebuggerAgent.h"
-#include "platform/heap/Handle.h"
-#include "wtf/HashMap.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-
-namespace blink {
-
-template <class K>
-class AsyncOperationMap final {
- DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
-public:
- using MapType = WillBeHeapHashMap<K, int>;
- explicit AsyncOperationMap(V8DebuggerAgent* debuggerAgent)
- : m_debuggerAgent(debuggerAgent)
- {
- }
-
- ~AsyncOperationMap()
- {
- // 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_asyncOperations)
- m_debuggerAgent->traceAsyncOperationCompleted(it.value);
- m_asyncOperations.clear();
- }
-
- void set(typename MapType::KeyPeekInType key, int operationId)
- {
- m_asyncOperations.set(key, operationId);
- }
-
- bool contains(typename MapType::KeyPeekInType key) const
- {
- return m_asyncOperations.contains(key);
- }
-
- int get(typename MapType::KeyPeekInType key) const
- {
- return m_asyncOperations.get(key);
- }
-
- void remove(typename MapType::KeyPeekInType key)
- {
- ASSERT(m_debuggerAgent);
- int operationId = m_asyncOperations.take(key);
- if (operationId)
- m_debuggerAgent->traceAsyncOperationCompleted(operationId);
- }
-
- DEFINE_INLINE_TRACE()
- {
- visitor->trace(m_asyncOperations);
- }
-
-private:
- V8DebuggerAgent* m_debuggerAgent;
- MapType m_asyncOperations;
-};
-
-} // namespace blink
-
-
-#endif // AsyncOperationMap_h

Powered by Google App Engine
This is Rietveld 408576698