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

Unified Diff: src/inspector/inspected-context.cc

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/inspected-context.h ('k') | src/inspector/v8-console.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/inspected-context.cc
diff --git a/src/inspector/inspected-context.cc b/src/inspector/inspected-context.cc
index 27766f200a5d21a3263f84b2dbc84206c774c4a7..01ade93702f4de21732b4c38fb791227d46356f6 100644
--- a/src/inspector/inspected-context.cc
+++ b/src/inspector/inspected-context.cc
@@ -23,8 +23,7 @@ InspectedContext::InspectedContext(V8InspectorImpl* inspector,
m_contextGroupId(info.contextGroupId),
m_origin(toString16(info.origin)),
m_humanReadableName(toString16(info.humanReadableName)),
- m_auxData(toString16(info.auxData)),
- m_reported(false) {
+ m_auxData(toString16(info.auxData)) {
v8::debug::SetContextId(info.context, contextId);
if (!info.hasMemoryOnConsole) return;
v8::Context::Scope contextScope(info.context);
@@ -54,6 +53,17 @@ v8::Isolate* InspectedContext::isolate() const {
return m_inspector->isolate();
}
+bool InspectedContext::isReported(int sessionId) const {
+ return m_reportedSessionIds.find(sessionId) != m_reportedSessionIds.cend();
+}
+
+void InspectedContext::setReported(int sessionId, bool reported) {
+ if (reported)
+ m_reportedSessionIds.insert(sessionId);
+ else
+ m_reportedSessionIds.erase(sessionId);
+}
+
bool InspectedContext::createInjectedScript() {
DCHECK(!m_injectedScript);
std::unique_ptr<InjectedScript> injectedScript = InjectedScript::create(this);
« no previous file with comments | « src/inspector/inspected-context.h ('k') | src/inspector/v8-console.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698