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

Unified Diff: src/inspector/v8-debugger-agent-impl.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/v8-debugger.cc ('k') | src/inspector/v8-inspector-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-debugger-agent-impl.cc
diff --git a/src/inspector/v8-debugger-agent-impl.cc b/src/inspector/v8-debugger-agent-impl.cc
index 96c995aecf686bc85ced0b7551fbe508b9c141fd..0e073b81ca09a97ff9bc3f5e7075b7751c3efb76 100644
--- a/src/inspector/v8-debugger-agent-impl.cc
+++ b/src/inspector/v8-debugger-agent-impl.cc
@@ -1238,7 +1238,15 @@ void V8DebuggerAgentImpl::breakProgram(
std::vector<BreakReason> currentScheduledReason;
currentScheduledReason.swap(m_breakReason);
pushBreakDetails(breakReason, std::move(data));
- if (!m_debugger->breakProgram(m_session->contextGroupId())) return;
+
+ int contextGroupId = m_session->contextGroupId();
+ int sessionId = m_session->sessionId();
+ V8InspectorImpl* inspector = m_inspector;
+ m_debugger->breakProgram(contextGroupId);
+ // Check that session and |this| are still around.
+ if (!inspector->sessionById(contextGroupId, sessionId)) return;
+ if (!enabled()) return;
+
popBreakDetails();
m_breakReason.swap(currentScheduledReason);
if (!m_breakReason.empty()) {
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | src/inspector/v8-inspector-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698