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

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

Issue 855383002: DevTools: use async operation id instead of AsyncCallChain (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments 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
Index: Source/core/inspector/AsyncCallChainMap.h
diff --git a/Source/core/inspector/AsyncCallChainMap.h b/Source/core/inspector/AsyncCallChainMap.h
index 8b8371199fd67d9b41f0f3ce932b46402e400951..14e6f77b546c9bf6e03b8ad63291b28fcabfbef6 100644
--- a/Source/core/inspector/AsyncCallChainMap.h
+++ b/Source/core/inspector/AsyncCallChainMap.h
@@ -18,7 +18,7 @@ template <class K>
class AsyncCallChainMap final {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
- using MapType = WillBeHeapHashMap<K, RefPtrWillBeMember<AsyncCallChain>>;
+ using MapType = WillBeHeapHashMap<K, int>;
explicit AsyncCallChainMap(InspectorDebuggerAgent* debuggerAgent)
: m_debuggerAgent(debuggerAgent)
{
@@ -47,13 +47,13 @@ public:
{
ASSERT(m_debuggerAgent);
for (auto it : m_asyncCallChains)
- m_debuggerAgent->traceAsyncOperationCompleted(it.value.get());
+ m_debuggerAgent->traceAsyncOperationCompleted(it.value);
m_asyncCallChains.clear();
}
- void set(typename MapType::KeyPeekInType key, PassRefPtrWillBeRawPtr<AsyncCallChain> chain)
+ void set(typename MapType::KeyPeekInType key, int operationId)
{
- m_asyncCallChains.set(key, chain);
+ m_asyncCallChains.set(key, operationId);
}
bool contains(typename MapType::KeyPeekInType key) const
@@ -61,7 +61,7 @@ public:
return m_asyncCallChains.contains(key);
}
- PassRefPtrWillBeRawPtr<AsyncCallChain> get(typename MapType::KeyPeekInType key) const
+ int get(typename MapType::KeyPeekInType key) const
{
return m_asyncCallChains.get(key);
}
@@ -69,9 +69,9 @@ public:
void remove(typename MapType::KeyPeekInType key)
{
ASSERT(m_debuggerAgent);
- RefPtrWillBeRawPtr<AsyncCallChain> chain = m_asyncCallChains.take(key);
- if (chain)
- m_debuggerAgent->traceAsyncOperationCompleted(chain.get());
+ int operationId = m_asyncCallChains.take(key);
+ if (operationId)
+ m_debuggerAgent->traceAsyncOperationCompleted(operationId);
}
void trace(Visitor* visitor)
« no previous file with comments | « no previous file | Source/core/inspector/AsyncCallTracker.h » ('j') | Source/core/inspector/InspectorDebuggerAgent.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698