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

Unified Diff: test/mjsunit/harmony/async-await-basic.js

Issue 2253033002: [interpreter] Don't assume generator functions do an initial yield. (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
Index: test/mjsunit/harmony/async-await-basic.js
diff --git a/test/mjsunit/harmony/async-await-basic.js b/test/mjsunit/harmony/async-await-basic.js
index b049a3ebe505f921671b0d4f3103b4b9b8407223..846baeb3fd416c068c975d2864fca5af31e78705 100644
--- a/test/mjsunit/harmony/async-await-basic.js
+++ b/test/mjsunit/harmony/async-await-basic.js
@@ -369,3 +369,10 @@ assertEqualsAsync(
"20", () => (async(foo, { a = "0" }) => foo + a)("2", { a: undefined }));
assertThrows(() => eval("async({ foo = 1 })"), SyntaxError);
assertThrows(() => eval("async(a, { foo = 1 })"), SyntaxError);
+
+// https://bugs.chromium.org/p/chromium/issues/detail?id=628984
+async function gaga() {
+ let i = 1;
+ while (i-- > 0) { await 42 }
+}
+assertDoesNotThrow(gaga);

Powered by Google App Engine
This is Rietveld 408576698