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

Unified Diff: test/cctest/test-parsing.cc

Issue 8562002: Make the parser track the language mode instead of keeping its own harmony flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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/scanner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index c2bde79b13b28a4333c95f781b3eeb4fd27a5d6f..4029484111cda555762e61bdd6336d35f2a0f594 100755
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -860,11 +860,13 @@ TEST(ScopePositions) {
i::Handle<i::String> source(
FACTORY->NewStringFromAscii(i::CStrVector(program.start())));
i::Handle<i::Script> script = FACTORY->NewScript(source);
+ bool harmony_scoping = i::FLAG_harmony_scoping;
+ i::FLAG_harmony_scoping = true;
i::Parser parser(script, false, NULL, NULL);
- parser.SetHarmonyScoping(true);
i::FunctionLiteral* function =
parser.ParseProgram(source, true, source_data[i].language_mode);
- ASSERT(function != NULL);
+ i::FLAG_harmony_scoping = harmony_scoping;
+ CHECK(function != NULL);
// Check scope types and positions.
i::Scope* scope = function->scope();
« no previous file with comments | « src/scanner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698