| Index: test/cctest/test-strings.cc
|
| diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc
|
| index 333e2a60732bc072ba14487704076ddbbfa5d8fb..d0eabe30188729cdc574edd76c7a8212ec91c3d2 100644
|
| --- a/test/cctest/test-strings.cc
|
| +++ b/test/cctest/test-strings.cc
|
| @@ -889,9 +889,9 @@ TEST(Utf8Conversion) {
|
| v8::HandleScope handle_scope(CcTest::isolate());
|
| // A simple ascii string
|
| const char* ascii_string = "abcdef12345";
|
| - int len =
|
| - v8::String::New(ascii_string,
|
| - StrLength(ascii_string))->Utf8Length();
|
| + int len = v8::String::NewFromUtf8(CcTest::isolate(), ascii_string,
|
| + v8::String::kNormalString,
|
| + StrLength(ascii_string))->Utf8Length();
|
| CHECK_EQ(StrLength(ascii_string), len);
|
| // A mixed ascii and non-ascii string
|
| // U+02E4 -> CB A4
|
| @@ -906,7 +906,8 @@ TEST(Utf8Conversion) {
|
| // The number of bytes expected to be written for each length
|
| const int lengths[12] = {0, 0, 2, 3, 3, 3, 6, 7, 7, 7, 10, 11};
|
| const int char_lengths[12] = {0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5};
|
| - v8::Handle<v8::String> mixed = v8::String::New(mixed_string, 5);
|
| + v8::Handle<v8::String> mixed = v8::String::NewFromTwoByte(
|
| + CcTest::isolate(), mixed_string, v8::String::kNormalString, 5);
|
| CHECK_EQ(10, mixed->Utf8Length());
|
| // Try encoding the string with all capacities
|
| char buffer[11];
|
| @@ -1083,8 +1084,8 @@ TEST(CachedHashOverflow) {
|
| const char* line;
|
| for (int i = 0; (line = lines[i]); i++) {
|
| printf("%s\n", line);
|
| - v8::Local<v8::Value> result =
|
| - v8::Script::Compile(v8::String::New(line))->Run();
|
| + v8::Local<v8::Value> result = v8::Script::Compile(
|
| + v8::String::NewFromUtf8(CcTest::isolate(), line))->Run();
|
| CHECK_EQ(results[i]->IsUndefined(), result->IsUndefined());
|
| CHECK_EQ(results[i]->IsNumber(), result->IsNumber());
|
| if (result->IsNumber()) {
|
| @@ -1230,8 +1231,8 @@ TEST(AsciiArrayJoin) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| LocalContext context;
|
| v8::V8::IgnoreOutOfMemoryException();
|
| - v8::Local<v8::Script> script =
|
| - v8::Script::Compile(v8::String::New(join_causing_out_of_memory));
|
| + v8::Local<v8::Script> script = v8::Script::Compile(
|
| + v8::String::NewFromUtf8(CcTest::isolate(), join_causing_out_of_memory));
|
| v8::Local<v8::Value> result = script->Run();
|
|
|
| // Check for out of memory state.
|
|
|