| Index: test/cctest/test-parsing.cc
|
| diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
|
| index e6b536771a14ba453d9058e10ea94c8ba6bce8b6..f84b8ad6b3c93f58c9e5e19a4f4b11206bffadb3 100644
|
| --- a/test/cctest/test-parsing.cc
|
| +++ b/test/cctest/test-parsing.cc
|
| @@ -107,6 +107,7 @@ TEST(ScanKeywords) {
|
|
|
| TEST(ScanHTMLEndComments) {
|
| v8::V8::Initialize();
|
| + v8::Isolate* isolate = CcTest::isolate();
|
|
|
| // Regression test. See:
|
| // http://code.google.com/p/chromium/issues/detail?id=53548
|
| @@ -144,14 +145,14 @@ TEST(ScanHTMLEndComments) {
|
|
|
| for (int i = 0; tests[i]; i++) {
|
| v8::ScriptData* data =
|
| - v8::ScriptData::PreCompile(tests[i], i::StrLength(tests[i]));
|
| + v8::ScriptData::PreCompile(isolate, tests[i], i::StrLength(tests[i]));
|
| CHECK(data != NULL && !data->HasError());
|
| delete data;
|
| }
|
|
|
| for (int i = 0; fail_tests[i]; i++) {
|
| - v8::ScriptData* data =
|
| - v8::ScriptData::PreCompile(fail_tests[i], i::StrLength(fail_tests[i]));
|
| + v8::ScriptData* data = v8::ScriptData::PreCompile(
|
| + isolate, fail_tests[i], i::StrLength(fail_tests[i]));
|
| CHECK(data == NULL || data->HasError());
|
| delete data;
|
| }
|
| @@ -199,7 +200,7 @@ TEST(Preparsing) {
|
| int error_source_length = i::StrLength(error_source);
|
|
|
| v8::ScriptData* preparse =
|
| - v8::ScriptData::PreCompile(source, source_length);
|
| + v8::ScriptData::PreCompile(isolate, source, source_length);
|
| CHECK(!preparse->HasError());
|
| bool lazy_flag = i::FLAG_lazy;
|
| {
|
| @@ -221,7 +222,7 @@ TEST(Preparsing) {
|
|
|
| // Syntax error.
|
| v8::ScriptData* error_preparse =
|
| - v8::ScriptData::PreCompile(error_source, error_source_length);
|
| + v8::ScriptData::PreCompile(isolate, error_source, error_source_length);
|
| CHECK(error_preparse->HasError());
|
| i::ScriptDataImpl *pre_impl =
|
| reinterpret_cast<i::ScriptDataImpl*>(error_preparse);
|
| @@ -1027,11 +1028,11 @@ TEST(ScopePositions) {
|
| parser.set_allow_harmony_scoping(true);
|
| info.MarkAsGlobal();
|
| info.SetLanguageMode(source_data[i].language_mode);
|
| - i::FunctionLiteral* function = parser.ParseProgram();
|
| - CHECK(function != NULL);
|
| + parser.Parse();
|
| + CHECK(info.function() != NULL);
|
|
|
| // Check scope types and positions.
|
| - i::Scope* scope = function->scope();
|
| + i::Scope* scope = info.function()->scope();
|
| CHECK(scope->is_global_scope());
|
| CHECK_EQ(scope->start_position(), 0);
|
| CHECK_EQ(scope->end_position(), kProgramSize);
|
| @@ -1137,7 +1138,8 @@ void TestParserSyncWithFlags(i::Handle<i::String> source, unsigned flags) {
|
| i::Parser parser(&info);
|
| SET_PARSER_FLAGS(parser, flags);
|
| info.MarkAsGlobal();
|
| - function = parser.ParseProgram();
|
| + parser.Parse();
|
| + function = info.function();
|
| }
|
|
|
| // Check that preparsing fails iff parsing fails.
|
|
|