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); |