Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: test/cctest/test-log.cc

Issue 83343002: Remove usage of deprecated APIs from cctests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-lockers.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
« no previous file with comments | « test/cctest/test-lockers.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698