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

Side by Side Diff: test/debugger/debug/harmony/async-debug-step-nested.js

Issue 2621173002: Remove --harmony-async-await runtime flag (Closed)
Patch Set: Update test ref Created 3 years, 11 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
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-async-await
6
7 var Debug = debug.Debug;
8 var step_count = 0;
9
10 function listener(event, execState, eventData, data) {
11 if (event != Debug.DebugEvent.Break) return;
12 try {
13 var line = execState.frame(0).sourceLineText();
14 print(line);
15 var [match, expected_count, step] = /\/\/ B(\d) (\w+)$/.exec(line);
16 assertEquals(step_count++, parseInt(expected_count));
17 if (step != "Continue") execState.prepareStep(Debug.StepAction[step]);
18 } catch (e) {
19 print(e, e.stack);
20 quit(1);
21 }
22 }
23
24 Debug.setListener(listener);
25
26 var late_resolve;
27
28 function g() {
29 return new Promise( // B4 StepOut
30 function(res, rej) {
31 late_resolve = res;
32 }
33 );
34 }
35
36 async function f1() {
37 var a = 1;
38 debugger; // B0 StepNext
39 a += // B1 StepNext
40 await // B6 StepNext
41 f2(); // B2 StepIn
42 return a; // B7 StepNext
43 } // B8 Continue
44
45 async function f2() {
46 var b =
47 await // B5 StepOut
48 g(); // B3 StepIn
49 return b;
50 }
51
52 f1();
53
54 late_resolve(3);
55
56 %RunMicrotasks();
57
58 assertEquals(9, step_count);
OLDNEW
« no previous file with comments | « test/debugger/debug/harmony/async-debug-step-in-out-out.js ('k') | test/debugger/debug/harmony/async-debug-step-next.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698