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

Side by Side 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, 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/inspector/v8-debugger-agent-impl.h" 5 #include "src/inspector/v8-debugger-agent-impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/debug/debug-interface.h" 9 #include "src/debug/debug-interface.h"
10 #include "src/inspector/injected-script.h" 10 #include "src/inspector/injected-script.h"
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 m_frontend.resumed(); 1231 m_frontend.resumed();
1232 } 1232 }
1233 1233
1234 void V8DebuggerAgentImpl::breakProgram( 1234 void V8DebuggerAgentImpl::breakProgram(
1235 const String16& breakReason, 1235 const String16& breakReason,
1236 std::unique_ptr<protocol::DictionaryValue> data) { 1236 std::unique_ptr<protocol::DictionaryValue> data) {
1237 if (!enabled() || !m_debugger->canBreakProgram() || m_skipAllPauses) return; 1237 if (!enabled() || !m_debugger->canBreakProgram() || m_skipAllPauses) return;
1238 std::vector<BreakReason> currentScheduledReason; 1238 std::vector<BreakReason> currentScheduledReason;
1239 currentScheduledReason.swap(m_breakReason); 1239 currentScheduledReason.swap(m_breakReason);
1240 pushBreakDetails(breakReason, std::move(data)); 1240 pushBreakDetails(breakReason, std::move(data));
1241 if (!m_debugger->breakProgram(m_session->contextGroupId())) return; 1241
1242 int contextGroupId = m_session->contextGroupId();
1243 int sessionId = m_session->sessionId();
1244 V8InspectorImpl* inspector = m_inspector;
1245 m_debugger->breakProgram(contextGroupId);
1246 // Check that session and |this| are still around.
1247 if (!inspector->sessionById(contextGroupId, sessionId)) return;
1248 if (!enabled()) return;
1249
1242 popBreakDetails(); 1250 popBreakDetails();
1243 m_breakReason.swap(currentScheduledReason); 1251 m_breakReason.swap(currentScheduledReason);
1244 if (!m_breakReason.empty()) { 1252 if (!m_breakReason.empty()) {
1245 m_debugger->setPauseOnNextStatement(true, m_session->contextGroupId()); 1253 m_debugger->setPauseOnNextStatement(true, m_session->contextGroupId());
1246 } 1254 }
1247 } 1255 }
1248 1256
1249 void V8DebuggerAgentImpl::breakProgramOnException( 1257 void V8DebuggerAgentImpl::breakProgramOnException(
1250 const String16& breakReason, 1258 const String16& breakReason,
1251 std::unique_ptr<protocol::DictionaryValue> data) { 1259 std::unique_ptr<protocol::DictionaryValue> data) {
(...skipping 22 matching lines...) Expand all
1274 1282
1275 void V8DebuggerAgentImpl::reset() { 1283 void V8DebuggerAgentImpl::reset() {
1276 if (!enabled()) return; 1284 if (!enabled()) return;
1277 m_blackboxedPositions.clear(); 1285 m_blackboxedPositions.clear();
1278 resetBlackboxedStateCache(); 1286 resetBlackboxedStateCache();
1279 m_scripts.clear(); 1287 m_scripts.clear();
1280 m_breakpointIdToDebuggerBreakpointIds.clear(); 1288 m_breakpointIdToDebuggerBreakpointIds.clear();
1281 } 1289 }
1282 1290
1283 } // namespace v8_inspector 1291 } // namespace v8_inspector
OLDNEW
« 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