Index: test/cctest/test-log.cc |
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc |
index 2cf2a77445bb1b5a1934e2f10db90643e48fbb6e..b838fda5fedb97fbecc60bfdca2b7b2c09428e3c 100644 |
--- a/test/cctest/test-log.cc |
+++ b/test/cctest/test-log.cc |
@@ -307,7 +307,8 @@ TEST(Issue23768) { |
SimpleExternalString source_ext_str("(function ext() {})();"); |
v8::Local<v8::String> source = v8::String::NewExternal(&source_ext_str); |
// Script needs to have a name in order to trigger InitLineEnds execution. |
- v8::Handle<v8::String> origin = v8::String::New("issue-23768-test"); |
+ v8::Handle<v8::String> origin = |
+ v8::String::NewFromUtf8(CcTest::isolate(), "issue-23768-test"); |
v8::Handle<v8::Script> evil_script = v8::Script::Compile(source, origin); |
CHECK(!evil_script.IsEmpty()); |
CHECK(!evil_script->Run().IsEmpty()); |
@@ -451,12 +452,14 @@ TEST(EquivalenceOfLoggingAndTraversal) { |
i::Vector<const char> log( |
i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); |
CHECK(exists); |
- v8::Handle<v8::String> log_str = v8::String::New(log.start(), log.length()); |
+ v8::Handle<v8::String> log_str = v8::String::NewFromUtf8( |
+ CcTest::isolate(), log.start(), v8::String::kNormalString, log.length()); |
initialize_logger.env()->Global()->Set(v8_str("_log"), log_str); |
i::Vector<const unsigned char> source = TestSources::GetScriptsSource(); |
- v8::Handle<v8::String> source_str = v8::String::New( |
- reinterpret_cast<const char*>(source.start()), source.length()); |
+ v8::Handle<v8::String> source_str = v8::String::NewFromUtf8( |
+ CcTest::isolate(), reinterpret_cast<const char*>(source.start()), |
+ v8::String::kNormalString, source.length()); |
v8::TryCatch try_catch; |
v8::Handle<v8::Script> script = v8::Script::Compile(source_str, v8_str("")); |
if (script.IsEmpty()) { |