Reviewers: adamk,
Message:
The late catch in https://codereview.chromium.org/1320673007/ where I added
a
"if (*ok == false) return" fixed the failure to enforce the yield
restriction
for param initializers of functions that declare 'use strict' in their
bodies
instead of outside.
Description:
'use strict' in function bodies forbid 'yield' in param initializers
R=ad...@chromium.org
LOG=N
BUG=v8:4397
Please review this at https://codereview.chromium.org/1318253002/
Base URL: https://chromium.googlesource.com/v8/v8@master
Affected files (+4, -6 lines):
M test/cctest/test-parsing.cc
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index
4f73c9ffdfca05d167732df183fb460997a4d014..603cb30b2a1abd10f17726bf9a4bbc555c5ae238
100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -6763,9 +6763,8 @@ TEST(DefaultParametersYieldInInitializers) {
const char* strict_function_context_data[][2] = {
{"'use strong'; (function f(", ") { });"},
{"'use strict'; (function f(", ") { });"},
- // TODO(wingo,conradw): These should also signal early errors.
- // {"(function f(", ") {'use strong'; });"},
- // {"(function f(", ") {'use strict'; });"},
+ {"(function f(", ") {'use strong'; });"},
+ {"(function f(", ") {'use strict'; });"},
// TODO(wingo): Add arrow functions.
{NULL, NULL}
};
@@ -6773,9 +6772,8 @@ TEST(DefaultParametersYieldInInitializers) {
const char* generator_context_data[][2] = {
{"'use strong'; (function *g(", ") { });"},
{"'use strict'; (function *g(", ") { });"},
- // TODO(wingo,conradw): These should also signal early errors.
- // {"(function *g(", ") {'use strong'; });"},
- // {"(function *g(", ") {'use strict'; });"},
+ {"(function *g(", ") {'use strong'; });"},
+ {"(function *g(", ") {'use strict'; });"},
{"(function *g(", ") { });"},
{NULL, NULL}
};
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.