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

Unified Diff: src/preparser.cc

Issue 8306024: Make native syntax an early error in the preparser. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Unified enums Created 9 years, 2 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 | « src/preparser.h ('k') | src/preparser-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 9f8e1eecc2fb59b134a244c69877c378aa6b786e..55c564ce57c3d2ae79f2e463945eaa4bdcd38032 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -1353,8 +1353,11 @@ PreParser::Expression PreParser::ParseFunctionLiteral(bool* ok) {
PreParser::Expression PreParser::ParseV8Intrinsic(bool* ok) {
// CallRuntime ::
// '%' Identifier Arguments
-
Expect(i::Token::MOD, CHECK_OK);
+ if (!allow_natives_syntax_) {
+ *ok = false;
+ return Expression::Default();
+ }
ParseIdentifier(CHECK_OK);
ParseArguments(ok);
« no previous file with comments | « src/preparser.h ('k') | src/preparser-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698