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

Side by Side Diff: test/debugger/debug/es6/debug-stepin-tailcalls.js

Issue 2480283002: Revert of [debugger] Migrate more debugger tests to inspector (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --harmony-tailcalls
6
7 "use strict";
8
9 var Debug = debug.Debug
10 var exception = null;
11 var breaks = 0;
12
13 function f(x) {
14 if (x > 0) { // B3 B5 B7 B9
15 return f(x - 1); // B4 B6 B8
16 }
17 } // B10
18
19 function g(x) {
20 return f(x); // B2
21 }
22
23 function h(x) {
24 debugger; // B0
25 g(x); // B1
26 } // B11
27
28
29 function listener(event, exec_state, event_data, data) {
30 if (event != Debug.DebugEvent.Break) return;
31 try {
32 print(event_data.sourceLineText());
33 assertTrue(event_data.sourceLineText().indexOf(`B${breaks++}`) > 0);
34 exec_state.prepareStep(Debug.StepAction.StepIn);
35 } catch (e) {
36 exception = e;
37 };
38 };
39
40 Debug.setListener(listener);
41
42 h(3);
43
44 Debug.setListener(null); // B12
45 assertNull(exception);
46 assertEquals(13, breaks);
OLDNEW
« no previous file with comments | « test/debugger/debug/es6/debug-stepin-generators.js ('k') | test/debugger/debug/es6/debug-stepout-tailcalls.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698