OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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 InspectorTest.log('Checks stepping over tail calls.'); | 5 InspectorTest.log('Checks stepping over tail calls.'); |
6 | 6 |
7 InspectorTest.setupScriptMap(); | 7 InspectorTest.setupScriptMap(); |
8 InspectorTest.dumpProtocolCommand('Debugger.pause'); | 8 InspectorTest.logProtocolCommandCalls('Debugger.pause'); |
9 InspectorTest.dumpProtocolCommand('Debugger.stepInto'); | 9 InspectorTest.logProtocolCommandCalls('Debugger.stepInto'); |
10 InspectorTest.dumpProtocolCommand('Debugger.stepOver'); | 10 InspectorTest.logProtocolCommandCalls('Debugger.stepOver'); |
11 InspectorTest.dumpProtocolCommand('Debugger.stepOut'); | 11 InspectorTest.logProtocolCommandCalls('Debugger.stepOut'); |
12 InspectorTest.dumpProtocolCommand('Debugger.resume'); | 12 InspectorTest.logProtocolCommandCalls('Debugger.resume'); |
13 | 13 |
14 let source = ` | 14 let source = ` |
15 function f(x) { | 15 function f(x) { |
16 if (x == 2) debugger; | 16 if (x == 2) debugger; |
17 if (x-- > 0) return f(x); | 17 if (x-- > 0) return f(x); |
18 } | 18 } |
19 f(5); | 19 f(5); |
20 `; | 20 `; |
21 | 21 |
22 Protocol.Debugger.enable(); | 22 Protocol.Debugger.enable(); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 Protocol.Debugger.stepOut(); | 72 Protocol.Debugger.stepOut(); |
73 await logPauseLocation(await Protocol.Debugger.oncePaused()); | 73 await logPauseLocation(await Protocol.Debugger.oncePaused()); |
74 await Protocol.Debugger.resume(); | 74 await Protocol.Debugger.resume(); |
75 } | 75 } |
76 ]); | 76 ]); |
77 | 77 |
78 function logPauseLocation(message) { | 78 function logPauseLocation(message) { |
79 InspectorTest.logCallFrames(message.params.callFrames); | 79 InspectorTest.logCallFrames(message.params.callFrames); |
80 return InspectorTest.logSourceLocation(message.params.callFrames[0].location); | 80 return InspectorTest.logSourceLocation(message.params.callFrames[0].location); |
81 } | 81 } |
OLD | NEW |