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

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

Issue 7565003: Revert "Revert "Fix a bug in scope analysis."" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update test expectation. Created 9 years, 5 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
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index ed01532303b6231714103942ce1eb30610b828b6..dad5e1b80340c70636cfd603fe3252fd04dd6c4f 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -10663,17 +10663,16 @@ TEST(PreCompileInvalidPreparseDataError) {
*exception_value);
try_catch.Reset();
+
// Overwrite function bar's start position with 200. The function entry
- // will not be found when searching for it by position.
+ // will not be found when searching for it by position and we should fall
+ // back on eager compilation.
sd = v8::ScriptData::PreCompile(script, i::StrLength(script));
sd_data = reinterpret_cast<unsigned*>(const_cast<char*>(sd->Data()));
sd_data[kHeaderSize + 1 * kFunctionEntrySize + kFunctionEntryStartOffset] =
200;
compiled_script = Script::New(source, NULL, sd);
- CHECK(try_catch.HasCaught());
- String::AsciiValue second_exception_value(try_catch.Message()->Get());
- CHECK_EQ("Uncaught SyntaxError: Invalid preparser data for function bar",
- *second_exception_value);
+ CHECK(!try_catch.HasCaught());
delete sd;
}
« src/parser.cc ('K') | « src/parser.cc ('k') | test/mjsunit/regress/regress-91120.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698