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

Unified Diff: test/cctest/test-serialize.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-profile-generator.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index 4132d2d4cf1d018bad1fbbffb00e5625bcc92bfb..c01a6889c35ef9d355458fdf8e7472e1500aecaf 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -347,7 +347,7 @@ DEPENDENT_TEST(DeserializeAndRunScript2, Serialize) {
env->Enter();
const char* c_source = "\"1234\".length";
- v8::Local<v8::String> source = v8::String::New(c_source);
+ v8::Local<v8::String> source = v8::String::NewFromUtf8(isolate, c_source);
v8::Local<v8::Script> script = v8::Script::Compile(source);
CHECK_EQ(4, script->Run()->Int32Value());
}
@@ -365,7 +365,7 @@ DEPENDENT_TEST(DeserializeFromSecondSerializationAndRunScript2,
env->Enter();
const char* c_source = "\"1234\".length";
- v8::Local<v8::String> source = v8::String::New(c_source);
+ v8::Local<v8::String> source = v8::String::NewFromUtf8(isolate, c_source);
v8::Local<v8::Script> script = v8::Script::Compile(source);
CHECK_EQ(4, script->Run()->Int32Value());
}
@@ -402,7 +402,7 @@ TEST(PartialSerialization) {
Object* raw_foo;
{
v8::HandleScope handle_scope(v8_isolate);
- v8::Local<v8::String> foo = v8::String::New("foo");
+ v8::Local<v8::String> foo = v8::String::NewFromUtf8(v8_isolate, "foo");
ASSERT(!foo.IsEmpty());
raw_foo = *(v8::Utils::OpenHandle(*foo));
}
@@ -415,7 +415,7 @@ TEST(PartialSerialization) {
v8::HandleScope handle_scope(v8_isolate);
v8::Local<v8::Context>::New(v8_isolate, env)->Exit();
}
- env.Dispose();
+ env.Reset();
FileByteSink startup_sink(startup_name.start());
StartupSerializer startup_serializer(isolate, &startup_sink);
@@ -562,7 +562,7 @@ TEST(ContextSerialization) {
i::Object* raw_context = *v8::Utils::OpenPersistent(env);
- env.Dispose();
+ env.Reset();
FileByteSink startup_sink(startup_name.start());
StartupSerializer startup_serializer(isolate, &startup_sink);
« no previous file with comments | « test/cctest/test-profile-generator.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698