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

Unified Diff: src/parsing/parser-base.h

Issue 2185223002: Fix not throwing error when redefine eval or arguments in strict mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: update 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
« no previous file with comments | « no previous file | test/mjsunit/strict-mode-eval.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 6058d25c6f887069b59e777fb3815366e9f0c79b..bd9e77c4a35a0711dd2850bbf0535943e7d45eb4 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -1909,6 +1909,13 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParsePropertyName(
scanner()->IsGetOrSet(is_get, is_set);
if (this->IsAwait(*name)) {
adamk 2016/08/05 22:29:29 I actually don't know why we handle this here inst
lpy 2016/08/09 01:01:47 Done.
*is_await = true;
+ } else if (this->IsEval(*name)) {
adamk 2016/08/05 22:29:29 What about "arguments"? Is there a reason check h
lpy 2016/08/09 01:01:47 My understanding is when parsing the property name
+ classifier->RecordStrictModeFormalParameterError(
adamk 2016/08/05 22:29:29 Not clear on why this is an error in sloppy mode.
+ scanner()->location(), MessageTemplate::kStrictEvalArguments);
+ if (is_strict(language_mode())) {
+ classifier->RecordBindingPatternError(
+ scanner()->location(), MessageTemplate::kStrictEvalArguments);
+ }
}
break;
}
« no previous file with comments | « no previous file | test/mjsunit/strict-mode-eval.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698