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

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

Issue 2235423003: [parser] improve inferred function names for async arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/async-function-stacktrace.js
diff --git a/test/mjsunit/harmony/async-function-stacktrace.js b/test/mjsunit/harmony/async-function-stacktrace.js
index 921f06350056fd95be13874fff642176d17c0171..d5b2a4dde10723aed36b7214d6a99c3dc5af788b 100644
--- a/test/mjsunit/harmony/async-function-stacktrace.js
+++ b/test/mjsunit/harmony/async-function-stacktrace.js
@@ -83,12 +83,12 @@ async function runTests() {
try { await reject(); } catch (e) { throw new Error("FAIL"); }
} }).c4, ["c4"]);
- // TODO(caitp): `async` probably shouldn't be the inferred name for async
- // arrow functions...
+ // TODO(caitp): We should infer anonymous async functions as the empty
+ // string, not as the name of a function they're passed as a parameter to.
await test(async() => { throw new Error("FAIL") },
- ["async", "test", "runTests"]);
+ ["test", "test", "runTests"]);
- await test(async() => { await 1; throw new Error("FAIL") }, ["async"]);
+ await test(async x => { await 1; throw new Error("FAIL") }, ["test"]);
await test(async() => {
await 1;
@@ -97,7 +97,7 @@ async function runTests() {
} catch (e) {
throw new Error("FAIL");
}
- }, ["async"]);
+ }, ["test"]);
await test(async() => {
await 1;
@@ -106,7 +106,7 @@ async function runTests() {
} catch (e) {
throw new Error("FAIL");
}
- }, ["async"]);
+ }, ["test"]);
Dan Ehrenberg 2016/08/12 00:39:21 Maybe add a test to show that async functions with
}
runTests().catch(e => {
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698