Commit dc26486c authored by Dmitry Gozman's avatar Dmitry Gozman Committed by Commit Bot

[inspector] Issue Debugger.paused during Debugger.enable if already paused

Bug: chromium:590878
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id94d3557980522d98c136aa444615930bee2e3ba
Reviewed-on: https://chromium-review.googlesource.com/625159
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47526}
parent d3229dee
......@@ -335,6 +335,11 @@ void V8DebuggerAgentImpl::enableImpl() {
m_breakpointsActive = true;
m_debugger->setBreakpointsActive(true);
if (isPaused()) {
didPause(0, v8::Local<v8::Value>(), std::vector<v8::debug::BreakpointId>(),
false, false, false, false);
}
}
Response V8DebuggerAgentImpl::enable() {
......
Tests how multiple sessions interact while pausing, stepping, setting breakpoints and blackboxing.
Connecting session 1
Pausing in 1
Paused in 1:
reason: other
hit breakpoints:
location: <anonymous>@0
data: null
Connecting session 2
Paused in 2:
reason: other
hit breakpoints:
location: <anonymous>@0
data: null
Resuming in 2
Resumed in 1
Resumed in 2
Setting breakpoints in 1
Setting breakpoints in 2
Evaluating common breakpoint in 1
......
......@@ -27,10 +27,20 @@ function bar() {
//# sourceURL=test2.js`, 23, 25);
(async function test() {
InspectorTest.log('Connecting session 1');
var session1 = contextGroup.connect();
await session1.Protocol.Debugger.enable();
InspectorTest.log('Pausing in 1');
session1.Protocol.Runtime.evaluate({expression: 'debugger;'});
await waitForPaused(session1, 1);
InspectorTest.log('Connecting session 2');
var session2 = contextGroup.connect();
await session2.Protocol.Debugger.enable();
var enabledPromise = session2.Protocol.Debugger.enable();
await waitForPaused(session2, 2);
await enabledPromise;
InspectorTest.log('Resuming in 2');
session2.Protocol.Debugger.resume();
await waitForBothResumed();
InspectorTest.log('Setting breakpoints in 1');
await session1.Protocol.Debugger.setBreakpointByUrl({url: 'test.js', lineNumber: 11});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment