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

Side by Side Diff: test/mjsunit/harmony/debug-async-function-async-task-event.js

Issue 2348403002: Reland of Fix async/await memory leak (Closed)
Patch Set: Formatting Created 4 years, 3 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
« no previous file with comments | « test/mjsunit/harmony/async-await-throw-loop.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 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 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 // Flags: --harmony-async-await --expose-debug-as debug --allow-natives-syntax 5 // Flags: --harmony-async-await --expose-debug-as debug --allow-natives-syntax
6 6
7 Debug = debug.Debug; 7 Debug = debug.Debug;
8 8
9 var base_id = -1; 9 var base_id = -1;
10 var exception = null; 10 var exception = null;
11 var expected = [ 11 var expected = [
12 "enqueue #1", 12 'enqueue #1',
13 "willHandle #1", 13 'willHandle #1',
14 "then #1", 14 'then #1',
15 "enqueue #2", 15 'enqueue #2',
16 "enqueue #3", 16 'didHandle #1',
17 "didHandle #1", 17 'willHandle #2',
18 "willHandle #2", 18 'then #2',
19 "then #2", 19 'didHandle #2',
20 "didHandle #2",
21 "willHandle #3",
22 "enqueue #4",
23 "didHandle #3",
24 "willHandle #4",
25 "didHandle #4",
26 ]; 20 ];
27 21
28 function assertLog(msg) { 22 function assertLog(msg) {
29 print(msg); 23 print(msg);
30 assertTrue(expected.length > 0); 24 assertTrue(expected.length > 0);
31 assertEquals(expected.shift(), msg); 25 assertEquals(expected.shift(), msg);
32 if (!expected.length) { 26 if (!expected.length) {
33 Debug.setListener(null); 27 Debug.setListener(null);
34 } 28 }
35 } 29 }
(...skipping 25 matching lines...) Expand all
61 assertLog("then #1"); 55 assertLog("then #1");
62 await undefined; 56 await undefined;
63 assertLog("then #2"); 57 assertLog("then #2");
64 } 58 }
65 main(); 59 main();
66 resolver(); 60 resolver();
67 61
68 %RunMicrotasks(); 62 %RunMicrotasks();
69 63
70 assertNull(exception); 64 assertNull(exception);
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/async-await-throw-loop.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698