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

Unified Diff: src/inspector/v8-inspector-impl.h

Issue 2906153002: [inspector] Support multiple sessions per context group (Closed)
Patch Set: using set per kozy@ Created 3 years, 7 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 | « src/inspector/v8-debugger-agent-impl.cc ('k') | src/inspector/v8-inspector-impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-inspector-impl.h
diff --git a/src/inspector/v8-inspector-impl.h b/src/inspector/v8-inspector-impl.h
index 697248dfeaad78df984573452dc3fef9e63fffa2..3effb39f7cb70f3a8f5db8560a963f70429f8381 100644
--- a/src/inspector/v8-inspector-impl.h
+++ b/src/inspector/v8-inspector-impl.h
@@ -104,12 +104,13 @@ class V8InspectorImpl : public V8Inspector {
bool hasConsoleMessageStorage(int contextGroupId);
void discardInspectedContext(int contextGroupId, int contextId);
void disconnect(V8InspectorSessionImpl*);
- V8InspectorSessionImpl* sessionForContextGroup(int contextGroupId);
- V8InspectorSessionImpl* sessionById(int sessionId);
+ V8InspectorSessionImpl* sessionById(int contextGroupId, int sessionId);
InspectedContext* getContext(int groupId, int contextId) const;
V8Console* console();
void forEachContext(int contextGroupId,
std::function<void(InspectedContext*)> callback);
+ void forEachSession(int contextGroupId,
+ std::function<void(V8InspectorSessionImpl*)> callback);
private:
v8::Isolate* m_isolate;
@@ -130,9 +131,9 @@ class V8InspectorImpl : public V8Inspector {
protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>;
ContextsByGroupMap m_contexts;
- using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>;
- SessionMap m_sessions;
- protocol::HashMap<int, V8InspectorSessionImpl*> m_sessionById;
+ // contextGroupId -> sessionId -> session
+ protocol::HashMap<int, protocol::HashMap<int, V8InspectorSessionImpl*>>
+ m_sessions;
using ConsoleStorageMap =
protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>;
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.cc ('k') | src/inspector/v8-inspector-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698