Commit 383529c2 authored by Johannes Henkel's avatar Johannes Henkel Committed by Commit Bot

Replace usage of protocol::Hash{Set,Map} with std::unordered_{set,map}.

This is in preparation of removing the using statements that are
currently in third_party/inspector_protocol/lib/Collections_h.template.

Once this is done I can update
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1135832
some more and eventually roll it into v8 (and chromium's third party).

R=dgozman

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I75a7b291715f241e3b58fb97ac91a0b0ff0ca70b
Reviewed-on: https://chromium-review.googlesource.com/1135968
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54422}
parent ec4fa063
......@@ -6,6 +6,7 @@
#define V8_INSPECTOR_V8_DEBUGGER_AGENT_IMPL_H_
#include <deque>
#include <unordered_map>
#include <vector>
#include "src/base/macros.h"
......@@ -183,11 +184,11 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
bool isPaused() const;
using ScriptsMap =
protocol::HashMap<String16, std::unique_ptr<V8DebuggerScript>>;
std::unordered_map<String16, std::unique_ptr<V8DebuggerScript>>;
using BreakpointIdToDebuggerBreakpointIdsMap =
protocol::HashMap<String16, std::vector<v8::debug::BreakpointId>>;
std::unordered_map<String16, std::vector<v8::debug::BreakpointId>>;
using DebuggerBreakpointIdToBreakpointIdMap =
protocol::HashMap<v8::debug::BreakpointId, String16>;
std::unordered_map<v8::debug::BreakpointId, String16>;
V8InspectorImpl* m_inspector;
V8Debugger* m_debugger;
......@@ -216,7 +217,7 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
bool m_breakpointsActive = false;
std::unique_ptr<V8Regex> m_blackboxPattern;
protocol::HashMap<String16, std::vector<std::pair<int, int>>>
std::unordered_map<String16, std::vector<std::pair<int, int>>>
m_blackboxedPositions;
DISALLOW_COPY_AND_ASSIGN(V8DebuggerAgentImpl);
......
......@@ -7,6 +7,7 @@
#include <list>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "src/base/macros.h"
......@@ -203,9 +204,9 @@ class V8Debugger : public v8::debug::DebugDelegate,
std::unique_ptr<V8StackTraceImpl> m_continueToLocationStack;
using AsyncTaskToStackTrace =
protocol::HashMap<void*, std::weak_ptr<AsyncStackTrace>>;
std::unordered_map<void*, std::weak_ptr<AsyncStackTrace>>;
AsyncTaskToStackTrace m_asyncTaskStacks;
protocol::HashSet<void*> m_recurringTasks;
std::unordered_set<void*> m_recurringTasks;
int m_maxAsyncCallStacks;
int m_maxAsyncCallStackDepth;
......@@ -221,7 +222,7 @@ class V8Debugger : public v8::debug::DebugDelegate,
std::list<std::shared_ptr<AsyncStackTrace>> m_allAsyncStacks;
std::unordered_map<int, std::weak_ptr<StackFrame>> m_framesCache;
protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap;
std::unordered_map<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap;
void* m_taskWithScheduledBreak = nullptr;
String16 m_taskWithScheduledBreakDebuggerId;
......@@ -233,13 +234,13 @@ class V8Debugger : public v8::debug::DebugDelegate,
v8_inspector::V8StackTraceId m_scheduledAsyncCall;
using StackTraceIdToStackTrace =
protocol::HashMap<uintptr_t, std::weak_ptr<AsyncStackTrace>>;
std::unordered_map<uintptr_t, std::weak_ptr<AsyncStackTrace>>;
StackTraceIdToStackTrace m_storedStackTraces;
uintptr_t m_lastStackTraceId = 0;
protocol::HashMap<int, std::pair<int64_t, int64_t>>
std::unordered_map<int, std::pair<int64_t, int64_t>>
m_contextGroupIdToDebuggerId;
protocol::HashMap<String16, std::pair<int64_t, int64_t>>
std::unordered_map<String16, std::pair<int64_t, int64_t>>
m_serializedDebuggerIdToDebuggerId;
std::unique_ptr<TerminateExecutionCallback> m_terminateExecutionCallback;
......
......@@ -33,6 +33,7 @@
#include <functional>
#include <map>
#include <unordered_map>
#include "src/base/macros.h"
#include "src/base/platform/mutex.h"
......@@ -147,23 +148,23 @@ class V8InspectorImpl : public V8Inspector {
int m_lastSessionId = 0;
uint64_t m_isolateId;
using MuteExceptionsMap = protocol::HashMap<int, int>;
using MuteExceptionsMap = std::unordered_map<int, int>;
MuteExceptionsMap m_muteExceptionsMap;
using ContextByIdMap =
protocol::HashMap<int, std::unique_ptr<InspectedContext>>;
std::unordered_map<int, std::unique_ptr<InspectedContext>>;
using ContextsByGroupMap =
protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>;
std::unordered_map<int, std::unique_ptr<ContextByIdMap>>;
ContextsByGroupMap m_contexts;
// contextGroupId -> sessionId -> session
protocol::HashMap<int, std::map<int, V8InspectorSessionImpl*>> m_sessions;
std::unordered_map<int, std::map<int, V8InspectorSessionImpl*>> m_sessions;
using ConsoleStorageMap =
protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>;
std::unordered_map<int, std::unique_ptr<V8ConsoleMessageStorage>>;
ConsoleStorageMap m_consoleStorageMap;
protocol::HashMap<int, int> m_contextIdToGroupIdMap;
std::unordered_map<int, int> m_contextIdToGroupIdMap;
std::unique_ptr<V8Console> m_console;
......
......@@ -31,6 +31,8 @@
#ifndef V8_INSPECTOR_V8_RUNTIME_AGENT_IMPL_H_
#define V8_INSPECTOR_V8_RUNTIME_AGENT_IMPL_H_
#include <unordered_map>
#include "src/base/macros.h"
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Runtime.h"
......@@ -137,7 +139,7 @@ class V8RuntimeAgentImpl : public protocol::Runtime::Backend {
protocol::Runtime::Frontend m_frontend;
V8InspectorImpl* m_inspector;
bool m_enabled;
protocol::HashMap<String16, std::unique_ptr<v8::Global<v8::Script>>>
std::unordered_map<String16, std::unique_ptr<v8::Global<v8::Script>>>
m_compiledScripts;
DISALLOW_COPY_AND_ASSIGN(V8RuntimeAgentImpl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment