Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index e53250def93322a9e965ac0b2be1455856375e47..3101c19e3b424344e6c73171bcd5374cc17a73fa 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -144,15 +144,20 @@ TEST(ScanHTMLEndComments) { |
reinterpret_cast<uintptr_t>(&marker) - 128 * 1024); |
for (int i = 0; tests[i]; i++) { |
- v8::ScriptData* data = |
- v8::ScriptData::PreCompile(isolate, tests[i], i::StrLength(tests[i])); |
+ v8::Handle<v8::String> source = v8::String::NewFromUtf8( |
+ isolate, tests[i], v8::String::kNormalString, i::StrLength(tests[i])); |
+ v8::ScriptData* data = v8::ScriptData::PreCompile(source); |
CHECK(data != NULL && !data->HasError()); |
delete data; |
} |
for (int i = 0; fail_tests[i]; i++) { |
- v8::ScriptData* data = v8::ScriptData::PreCompile( |
- isolate, fail_tests[i], i::StrLength(fail_tests[i])); |
+ v8::Handle<v8::String> source = |
+ v8::String::NewFromUtf8(isolate, |
+ fail_tests[i], |
+ v8::String::kNormalString, |
+ i::StrLength(fail_tests[i])); |
+ v8::ScriptData* data = v8::ScriptData::PreCompile(source); |
CHECK(data == NULL || data->HasError()); |
delete data; |
} |
@@ -199,8 +204,8 @@ TEST(Preparsing) { |
const char* error_source = "var x = y z;"; |
int error_source_length = i::StrLength(error_source); |
- v8::ScriptData* preparse = |
- v8::ScriptData::PreCompile(isolate, source, source_length); |
+ v8::ScriptData* preparse = v8::ScriptData::PreCompile(v8::String::NewFromUtf8( |
+ isolate, source, v8::String::kNormalString, source_length)); |
CHECK(!preparse->HasError()); |
bool lazy_flag = i::FLAG_lazy; |
{ |
@@ -223,8 +228,11 @@ TEST(Preparsing) { |
i::FLAG_lazy = lazy_flag; |
// Syntax error. |
- v8::ScriptData* error_preparse = |
- v8::ScriptData::PreCompile(isolate, error_source, error_source_length); |
+ v8::ScriptData* error_preparse = v8::ScriptData::PreCompile( |
+ v8::String::NewFromUtf8(isolate, |
+ error_source, |
+ v8::String::kNormalString, |
+ error_source_length)); |
CHECK(error_preparse->HasError()); |
i::ScriptDataImpl *pre_impl = |
reinterpret_cast<i::ScriptDataImpl*>(error_preparse); |