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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h

Issue 2087953004: Switch v8 inspector to stl collections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually remove a value from the list Created 4 years, 6 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/platform/v8_inspector/V8DebuggerImpl.h
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h
index b62a2a003a5661c92e7d894864f5c8dca0ae2c7e..a25dc422310efb2a63c6f50037f641fcfad2d389 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h
@@ -31,6 +31,7 @@
#ifndef V8DebuggerImpl_h
#define V8DebuggerImpl_h
+#include "platform/inspector_protocol/Collections.h"
#include "platform/inspector_protocol/Maybe.h"
#include "platform/inspector_protocol/Platform.h"
#include "platform/v8_inspector/JavaScriptCallFrame.h"
@@ -41,6 +42,8 @@
#include <v8-debug.h>
#include <v8.h>
+#include <vector>
+
namespace blink {
using protocol::Maybe;
@@ -86,7 +89,7 @@ public:
// Each script inherits debug data from v8::Context where it has been compiled.
// Only scripts whose debug data matches |contextGroupId| will be reported.
// Passing 0 will result in reporting all scripts.
- void getCompiledScripts(int contextGroupId, protocol::Vector<V8DebuggerParsedScript>&);
+ void getCompiledScripts(int contextGroupId, std::vector<V8DebuggerParsedScript>&);
void debuggerAgentEnabled();
void debuggerAgentDisabled();
@@ -147,9 +150,17 @@ private:
void handleV8AsyncTaskEvent(V8DebuggerAgentImpl*, v8::Local<v8::Context>, v8::Local<v8::Object> executionState, v8::Local<v8::Object> eventData);
+ using ContextsByGroupMap = protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>;
+
+ bool isContextInGroup(int groupId, int contextId) const
dgozman 2016/06/24 17:01:13 Please move implementation to cpp.
eostroukhov-old 2016/06/24 22:24:26 Done.
+ {
+ ContextsByGroupMap::const_iterator iter = m_contexts.find(groupId);
+ return iter != m_contexts.cend()
+ && iter->second->find(contextId) != iter->second->cend();
+ }
+
v8::Isolate* m_isolate;
V8DebuggerClient* m_client;
- using ContextsByGroupMap = protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>;
ContextsByGroupMap m_contexts;
using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>;
SessionMap m_sessions;

Powered by Google App Engine
This is Rietveld 408576698