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

Unified Diff: gin/wrappable_unittest.cc

Issue 1112923003: Replace Handle<> with Local in remaining gin/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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 | « gin/wrappable.cc ('k') | gin/wrapper_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/wrappable_unittest.cc
diff --git a/gin/wrappable_unittest.cc b/gin/wrappable_unittest.cc
index ef0dce4cdc175277b0ad4839f319e2fabd13f97b..3d795716de4a907ed06478055589edf621e120c7 100644
--- a/gin/wrappable_unittest.cc
+++ b/gin/wrappable_unittest.cc
@@ -132,7 +132,7 @@ TEST_F(WrappableTest, WrapAndUnwrap) {
Handle<MyObject> obj = MyObject::Create(isolate);
- v8::Handle<v8::Value> wrapper = ConvertToV8(isolate, obj.get());
+ v8::Local<v8::Value> wrapper = ConvertToV8(isolate, obj.get());
EXPECT_FALSE(wrapper.IsEmpty());
MyObject* unwrapped = NULL;
@@ -145,7 +145,7 @@ TEST_F(WrappableTest, UnwrapFailures) {
v8::HandleScope handle_scope(isolate);
// Something that isn't an object.
- v8::Handle<v8::Value> thing = v8::Number::New(isolate, 42);
+ v8::Local<v8::Value> thing = v8::Number::New(isolate, 42);
MyObject* unwrapped = NULL;
EXPECT_FALSE(ConvertFromV8(isolate, thing, &unwrapped));
EXPECT_FALSE(unwrapped);
@@ -177,20 +177,20 @@ TEST_F(WrappableTest, GetAndSetProperty) {
obj->set_value(42);
EXPECT_EQ(42, obj->value());
- v8::Handle<v8::String> source = StringToV8(isolate,
+ v8::Local<v8::String> source = StringToV8(isolate,
"(function (obj) {"
" if (obj.value !== 42) throw 'FAIL';"
" else obj.value = 191; })");
EXPECT_FALSE(source.IsEmpty());
gin::TryCatch try_catch;
- v8::Handle<v8::Script> script = v8::Script::Compile(source);
+ v8::Local<v8::Script> script = v8::Script::Compile(source);
EXPECT_FALSE(script.IsEmpty());
- v8::Handle<v8::Value> val = script->Run();
+ v8::Local<v8::Value> val = script->Run();
EXPECT_FALSE(val.IsEmpty());
- v8::Handle<v8::Function> func;
+ v8::Local<v8::Function> func;
EXPECT_TRUE(ConvertFromV8(isolate, val, &func));
- v8::Handle<v8::Value> argv[] = {
+ v8::Local<v8::Value> argv[] = {
ConvertToV8(isolate, obj.get()),
};
func->Call(v8::Undefined(isolate), 1, argv);
@@ -205,16 +205,16 @@ TEST_F(WrappableTest, WrappableSubclass) {
v8::HandleScope handle_scope(isolate);
gin::Handle<MyObjectSubclass> object(MyObjectSubclass::Create(isolate));
- v8::Handle<v8::String> source = StringToV8(isolate,
+ v8::Local<v8::String> source = StringToV8(isolate,
"(function(obj) {"
"obj.sayHello('Lily');"
"})");
gin::TryCatch try_catch;
- v8::Handle<v8::Script> script = v8::Script::Compile(source);
- v8::Handle<v8::Value> val = script->Run();
- v8::Handle<v8::Function> func;
+ v8::Local<v8::Script> script = v8::Script::Compile(source);
+ v8::Local<v8::Value> val = script->Run();
+ v8::Local<v8::Function> func;
EXPECT_TRUE(ConvertFromV8(isolate, val, &func));
- v8::Handle<v8::Value> argv[] = {
+ v8::Local<v8::Value> argv[] = {
ConvertToV8(isolate, object.get())
};
func->Call(v8::Undefined(isolate), 1, argv);
@@ -228,16 +228,16 @@ TEST_F(WrappableTest, CallAsFunction) {
gin::Handle<MyCallableObject> object(MyCallableObject::Create(isolate));
EXPECT_EQ(0, object->result());
- v8::Handle<v8::String> source = StringToV8(isolate,
+ v8::Local<v8::String> source = StringToV8(isolate,
"(function(obj) {"
"obj(42, 2, 5);"
"})");
gin::TryCatch try_catch;
- v8::Handle<v8::Script> script = v8::Script::Compile(source);
- v8::Handle<v8::Value> val = script->Run();
- v8::Handle<v8::Function> func;
+ v8::Local<v8::Script> script = v8::Script::Compile(source);
+ v8::Local<v8::Value> val = script->Run();
+ v8::Local<v8::Function> func;
EXPECT_TRUE(ConvertFromV8(isolate, val, &func));
- v8::Handle<v8::Value> argv[] = {
+ v8::Local<v8::Value> argv[] = {
ConvertToV8(isolate, object.get())
};
func->Call(v8::Undefined(isolate), 1, argv);
@@ -251,16 +251,16 @@ TEST_F(WrappableTest, CallAsConstructor) {
gin::Handle<MyCallableObject> object(MyCallableObject::Create(isolate));
EXPECT_EQ(0, object->result());
- v8::Handle<v8::String> source = StringToV8(isolate,
+ v8::Local<v8::String> source = StringToV8(isolate,
"(function(obj) {"
"new obj(42, 2, 5);"
"})");
gin::TryCatch try_catch;
- v8::Handle<v8::Script> script = v8::Script::Compile(source);
- v8::Handle<v8::Value> val = script->Run();
- v8::Handle<v8::Function> func;
+ v8::Local<v8::Script> script = v8::Script::Compile(source);
+ v8::Local<v8::Value> val = script->Run();
+ v8::Local<v8::Function> func;
EXPECT_TRUE(ConvertFromV8(isolate, val, &func));
- v8::Handle<v8::Value> argv[] = {
+ v8::Local<v8::Value> argv[] = {
ConvertToV8(isolate, object.get())
};
func->Call(v8::Undefined(isolate), 1, argv);
« no previous file with comments | « gin/wrappable.cc ('k') | gin/wrapper_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698