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

Side by Side Diff: test/mjsunit/harmony/async-function-stacktrace.js

Issue 2151433005: Slight cleanup of TryCatch parsing/variable declaration (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « src/parsing/parser.cc ('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 5 // Flags: --harmony-async-await
6 6
7 async function test(func, funcs) { 7 async function test(func, funcs) {
8 try { 8 try {
9 await func(); 9 await func();
10 throw new Error("Expected " + func.toString() + " to throw"); 10 throw new Error("Expected " + func.toString() + " to throw");
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 await test(async() => { await 1; throw new Error("FAIL") }, ["async"]); 91 await test(async() => { await 1; throw new Error("FAIL") }, ["async"]);
92 92
93 await test(async() => { 93 await test(async() => {
94 await 1; 94 await 1;
95 try { 95 try {
96 await thrower(); 96 await thrower();
97 } catch (e) { 97 } catch (e) {
98 throw new Error("FAIL"); 98 throw new Error("FAIL");
99 } 99 }
100 }, ["e"]); // TODO(caitp): FuncNameInferer is doing some weird stuff... 100 }, ["async"]);
101 101
102 await test(async() => { 102 await test(async() => {
103 await 1; 103 await 1;
104 try { 104 try {
105 await reject(); 105 await reject();
106 } catch (e) { 106 } catch (e) {
107 throw new Error("FAIL"); 107 throw new Error("FAIL");
108 } 108 }
109 }, ["e"]); 109 }, ["async"]);
110 } 110 }
111 111
112 runTests().catch(e => { 112 runTests().catch(e => {
113 print(e); 113 print(e);
114 quit(1); 114 quit(1);
115 }); 115 });
OLDNEW
« no previous file with comments | « src/parsing/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698