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

Unified Diff: src/parser.cc

Issue 8312014: Port r9643 to 3.6 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.6
Patch Set: 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/compiler.cc ('k') | src/version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 5075f49f162d54ee2a9f3bf263523673fb78fcad..f9500c405b837eb8aab67c1e82b7c48e3684676d 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -5198,13 +5198,16 @@ bool ParserApi::Parse(CompilationInfo* info) {
bool harmony_block_scoping = !info->is_native() &&
FLAG_harmony_block_scoping;
if (info->is_lazy()) {
- Parser parser(script, true, NULL, NULL);
+ bool allow_natives_syntax =
+ FLAG_allow_natives_syntax ||
+ info->is_native();
+ Parser parser(script, allow_natives_syntax, NULL, NULL);
parser.SetHarmonyBlockScoping(harmony_block_scoping);
result = parser.ParseLazy(info);
} else {
// Whether we allow %identifier(..) syntax.
bool allow_natives_syntax =
- info->allows_natives_syntax() || FLAG_allow_natives_syntax;
+ info->is_native() || FLAG_allow_natives_syntax;
ScriptDataImpl* pre_data = info->pre_parse_data();
Parser parser(script,
allow_natives_syntax,
« no previous file with comments | « src/compiler.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698