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; |
} |