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 let {session, contextGroup, Protocol} = InspectorTest.start('Checks stepping ove
r tail calls.'); |
6 | 6 |
7 InspectorTest.setupScriptMap(); | 7 session.setupScriptMap(); |
8 InspectorTest.logProtocolCommandCalls('Debugger.pause'); | 8 InspectorTest.logProtocolCommandCalls('Debugger.pause'); |
9 InspectorTest.logProtocolCommandCalls('Debugger.stepInto'); | 9 InspectorTest.logProtocolCommandCalls('Debugger.stepInto'); |
10 InspectorTest.logProtocolCommandCalls('Debugger.stepOver'); | 10 InspectorTest.logProtocolCommandCalls('Debugger.stepOver'); |
11 InspectorTest.logProtocolCommandCalls('Debugger.stepOut'); | 11 InspectorTest.logProtocolCommandCalls('Debugger.stepOut'); |
12 InspectorTest.logProtocolCommandCalls('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); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 await logPauseLocation(await Protocol.Debugger.oncePaused()); | 69 await logPauseLocation(await Protocol.Debugger.oncePaused()); |
70 Protocol.Debugger.stepOut(); | 70 Protocol.Debugger.stepOut(); |
71 await logPauseLocation(await Protocol.Debugger.oncePaused()); | 71 await logPauseLocation(await Protocol.Debugger.oncePaused()); |
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 session.logCallFrames(message.params.callFrames); |
80 return InspectorTest.logSourceLocation(message.params.callFrames[0].location); | 80 return session.logSourceLocation(message.params.callFrames[0].location); |
81 } | 81 } |
OLD | NEW |