Replace Handle<> with Local in remaining gin/*
Handle is an alias for Local
BUG=424445
Review URL: https://codereview.chromium.org/1112923003
Cr-Commit-Position: refs/heads/master@{#327672}
diff --git a/gin/arguments.cc b/gin/arguments.cc
index 30ff784..8bd9930e 100644
--- a/gin/arguments.cc
+++ b/gin/arguments.cc
@@ -26,13 +26,13 @@
Arguments::~Arguments() {
}
-v8::Handle<v8::Value> Arguments::PeekNext() const {
+v8::Local<v8::Value> Arguments::PeekNext() const {
if (next_ >= info_->Length())
- return v8::Handle<v8::Value>();
+ return v8::Local<v8::Value>();
return (*info_)[next_];
}
-std::string V8TypeAsString(v8::Handle<v8::Value> value) {
+std::string V8TypeAsString(v8::Local<v8::Value> value) {
if (value.IsEmpty())
return "<empty handle>";
if (value->IsUndefined())
diff --git a/gin/arguments.h b/gin/arguments.h
index 96a3701..4ac38a7 100644
--- a/gin/arguments.h
+++ b/gin/arguments.h
@@ -36,7 +36,7 @@
insufficient_arguments_ = true;
return false;
}
- v8::Handle<v8::Value> val = (*info_)[next_++];
+ v8::Local<v8::Value> val = (*info_)[next_++];
return ConvertFromV8(isolate_, val, out);
}
@@ -49,7 +49,7 @@
int remaining = info_->Length() - next_;
out->resize(remaining);
for (int i = 0; i < remaining; ++i) {
- v8::Handle<v8::Value> val = (*info_)[next_++];
+ v8::Local<v8::Value> val = (*info_)[next_++];
if (!ConvertFromV8(isolate_, val, &out->at(i)))
return false;
}
@@ -72,7 +72,7 @@
info_->GetReturnValue().Set(ConvertToV8(isolate_, val));
}
- v8::Handle<v8::Value> PeekNext() const;
+ v8::Local<v8::Value> PeekNext() const;
void ThrowError() const;
void ThrowTypeError(const std::string& message) const;
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
index dba7763..9aad42e3 100644
--- a/gin/array_buffer.cc
+++ b/gin/array_buffer.cc
@@ -62,7 +62,7 @@
class ArrayBuffer::Private : public base::RefCounted<ArrayBuffer::Private> {
public:
static scoped_refptr<Private> From(v8::Isolate* isolate,
- v8::Handle<v8::ArrayBuffer> array);
+ v8::Local<v8::ArrayBuffer> array);
void* buffer() const { return buffer_; }
size_t length() const { return length_; }
@@ -70,7 +70,7 @@
private:
friend class base::RefCounted<Private>;
- Private(v8::Isolate* isolate, v8::Handle<v8::ArrayBuffer> array);
+ Private(v8::Isolate* isolate, v8::Local<v8::ArrayBuffer> array);
~Private();
static void FirstWeakCallback(const v8::WeakCallbackInfo<Private>& data);
@@ -84,9 +84,9 @@
};
scoped_refptr<ArrayBuffer::Private> ArrayBuffer::Private::From(
- v8::Isolate* isolate, v8::Handle<v8::ArrayBuffer> array) {
+ v8::Isolate* isolate, v8::Local<v8::ArrayBuffer> array) {
if (array->IsExternal()) {
- CHECK_EQ(WrapperInfo::From(v8::Handle<v8::Object>::Cast(array)),
+ CHECK_EQ(WrapperInfo::From(v8::Local<v8::Object>::Cast(array)),
&g_array_buffer_wrapper_info)
<< "Cannot mix blink and gin ArrayBuffers";
return make_scoped_refptr(static_cast<Private*>(
@@ -96,7 +96,7 @@
}
ArrayBuffer::Private::Private(v8::Isolate* isolate,
- v8::Handle<v8::ArrayBuffer> array)
+ v8::Local<v8::ArrayBuffer> array)
: array_buffer_(isolate, array), isolate_(isolate) {
// Take ownership of the array buffer.
CHECK(!array->IsExternal());
@@ -138,7 +138,7 @@
}
ArrayBuffer::ArrayBuffer(v8::Isolate* isolate,
- v8::Handle<v8::ArrayBuffer> array) {
+ v8::Local<v8::ArrayBuffer> array) {
private_ = ArrayBuffer::Private::From(isolate, array);
bytes_ = private_->buffer();
num_bytes_ = private_->length();
@@ -157,11 +157,11 @@
// Converter<ArrayBuffer> -----------------------------------------------------
bool Converter<ArrayBuffer>::FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
ArrayBuffer* out) {
if (!val->IsArrayBuffer())
return false;
- *out = ArrayBuffer(isolate, v8::Handle<v8::ArrayBuffer>::Cast(val));
+ *out = ArrayBuffer(isolate, v8::Local<v8::ArrayBuffer>::Cast(val));
return true;
}
@@ -173,7 +173,7 @@
}
ArrayBufferView::ArrayBufferView(v8::Isolate* isolate,
- v8::Handle<v8::ArrayBufferView> view)
+ v8::Local<v8::ArrayBufferView> view)
: array_buffer_(isolate, view->Buffer()),
offset_(view->ByteOffset()),
num_bytes_(view->ByteLength()) {
@@ -193,11 +193,11 @@
// Converter<ArrayBufferView> -------------------------------------------------
bool Converter<ArrayBufferView>::FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
ArrayBufferView* out) {
if (!val->IsArrayBufferView())
return false;
- *out = ArrayBufferView(isolate, v8::Handle<v8::ArrayBufferView>::Cast(val));
+ *out = ArrayBufferView(isolate, v8::Local<v8::ArrayBufferView>::Cast(val));
return true;
}
diff --git a/gin/array_buffer.h b/gin/array_buffer.h
index fe3fae2..4451540 100644
--- a/gin/array_buffer.h
+++ b/gin/array_buffer.h
@@ -26,7 +26,7 @@
class GIN_EXPORT ArrayBuffer {
public:
ArrayBuffer();
- ArrayBuffer(v8::Isolate* isolate, v8::Handle<v8::ArrayBuffer> buffer);
+ ArrayBuffer(v8::Isolate* isolate, v8::Local<v8::ArrayBuffer> buffer);
~ArrayBuffer();
ArrayBuffer& operator=(const ArrayBuffer& other);
@@ -45,14 +45,14 @@
template<>
struct GIN_EXPORT Converter<ArrayBuffer> {
- static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
+ static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
ArrayBuffer* out);
};
class GIN_EXPORT ArrayBufferView {
public:
ArrayBufferView();
- ArrayBufferView(v8::Isolate* isolate, v8::Handle<v8::ArrayBufferView> view);
+ ArrayBufferView(v8::Isolate* isolate, v8::Local<v8::ArrayBufferView> view);
~ArrayBufferView();
ArrayBufferView& operator=(const ArrayBufferView& other);
@@ -71,7 +71,7 @@
template<>
struct GIN_EXPORT Converter<ArrayBufferView> {
- static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
+ static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
ArrayBufferView* out);
};
diff --git a/gin/context_holder.cc b/gin/context_holder.cc
index 241b2562..a72250c 100644
--- a/gin/context_holder.cc
+++ b/gin/context_holder.cc
@@ -18,7 +18,7 @@
data_.reset();
}
-void ContextHolder::SetContext(v8::Handle<v8::Context> context) {
+void ContextHolder::SetContext(v8::Local<v8::Context> context) {
DCHECK(context_.IsEmpty());
context_.Reset(isolate_, context);
data_.reset(new PerContextData(this, context));
diff --git a/gin/converter.cc b/gin/converter.cc
index 07437b7..33656b5 100644
--- a/gin/converter.cc
+++ b/gin/converter.cc
@@ -166,7 +166,7 @@
}
bool Converter<Handle<External> >::FromV8(Isolate* isolate,
- v8::Handle<Value> val,
+ v8::Local<Value> val,
Handle<External>* out) {
if (!val->IsExternal())
return false;
@@ -185,7 +185,7 @@
return true;
}
-v8::Handle<v8::String> StringToSymbol(v8::Isolate* isolate,
+v8::Local<v8::String> StringToSymbol(v8::Isolate* isolate,
const base::StringPiece& val) {
return String::NewFromUtf8(isolate,
val.data(),
@@ -193,7 +193,7 @@
static_cast<uint32_t>(val.length()));
}
-std::string V8ToString(v8::Handle<v8::Value> value) {
+std::string V8ToString(v8::Local<v8::Value> value) {
if (value.IsEmpty())
return std::string();
std::string result;
diff --git a/gin/converter.h b/gin/converter.h
index e5c95fc..a07ada7e 100644
--- a/gin/converter.h
+++ b/gin/converter.h
@@ -19,133 +19,133 @@
template<>
struct GIN_EXPORT Converter<bool> {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
bool val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
bool* out);
};
template<>
struct GIN_EXPORT Converter<int32_t> {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
int32_t val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
int32_t* out);
};
template<>
struct GIN_EXPORT Converter<uint32_t> {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
uint32_t val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
uint32_t* out);
};
template<>
struct GIN_EXPORT Converter<int64_t> {
// Warning: JavaScript cannot represent 64 integers precisely.
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
int64_t val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
int64_t* out);
};
template<>
struct GIN_EXPORT Converter<uint64_t> {
// Warning: JavaScript cannot represent 64 integers precisely.
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
uint64_t val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
uint64_t* out);
};
template<>
struct GIN_EXPORT Converter<float> {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
float val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
float* out);
};
template<>
struct GIN_EXPORT Converter<double> {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
double val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
double* out);
};
template<>
struct GIN_EXPORT Converter<base::StringPiece> {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const base::StringPiece& val);
// No conversion out is possible because StringPiece does not contain storage.
};
template<>
struct GIN_EXPORT Converter<std::string> {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const std::string& val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
std::string* out);
};
template<>
-struct GIN_EXPORT Converter<v8::Handle<v8::Function> > {
+struct GIN_EXPORT Converter<v8::Local<v8::Function> > {
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
- v8::Handle<v8::Function>* out);
+ v8::Local<v8::Value> val,
+ v8::Local<v8::Function>* out);
};
template<>
-struct GIN_EXPORT Converter<v8::Handle<v8::Object> > {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
- v8::Handle<v8::Object> val);
+struct GIN_EXPORT Converter<v8::Local<v8::Object> > {
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
+ v8::Local<v8::Object> val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
- v8::Handle<v8::Object>* out);
+ v8::Local<v8::Value> val,
+ v8::Local<v8::Object>* out);
};
template<>
-struct GIN_EXPORT Converter<v8::Handle<v8::ArrayBuffer> > {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
- v8::Handle<v8::ArrayBuffer> val);
+struct GIN_EXPORT Converter<v8::Local<v8::ArrayBuffer> > {
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
+ v8::Local<v8::ArrayBuffer> val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
- v8::Handle<v8::ArrayBuffer>* out);
+ v8::Local<v8::Value> val,
+ v8::Local<v8::ArrayBuffer>* out);
};
template<>
-struct GIN_EXPORT Converter<v8::Handle<v8::External> > {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
- v8::Handle<v8::External> val);
+struct GIN_EXPORT Converter<v8::Local<v8::External> > {
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
+ v8::Local<v8::External> val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
- v8::Handle<v8::External>* out);
+ v8::Local<v8::Value> val,
+ v8::Local<v8::External>* out);
};
template<>
-struct GIN_EXPORT Converter<v8::Handle<v8::Value> > {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val);
+struct GIN_EXPORT Converter<v8::Local<v8::Value> > {
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
+ v8::Local<v8::Value> val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
- v8::Handle<v8::Value>* out);
+ v8::Local<v8::Value> val,
+ v8::Local<v8::Value>* out);
};
template<typename T>
struct Converter<std::vector<T> > {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const std::vector<T>& val) {
- v8::Handle<v8::Array> result(
+ v8::Local<v8::Array> result(
v8::Array::New(isolate, static_cast<int>(val.size())));
for (size_t i = 0; i < val.size(); ++i) {
result->Set(static_cast<int>(i), Converter<T>::ToV8(isolate, val[i]));
@@ -154,13 +154,13 @@
}
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
std::vector<T>* out) {
if (!val->IsArray())
return false;
std::vector<T> result;
- v8::Handle<v8::Array> array(v8::Handle<v8::Array>::Cast(val));
+ v8::Local<v8::Array> array(v8::Local<v8::Array>::Cast(val));
uint32_t length = array->Length();
for (uint32_t i = 0; i < length; ++i) {
T item;
@@ -176,26 +176,26 @@
// Convenience functions that deduce T.
template<typename T>
-v8::Handle<v8::Value> ConvertToV8(v8::Isolate* isolate, T input) {
+v8::Local<v8::Value> ConvertToV8(v8::Isolate* isolate, T input) {
return Converter<T>::ToV8(isolate, input);
}
-GIN_EXPORT inline v8::Handle<v8::String> StringToV8(
+GIN_EXPORT inline v8::Local<v8::String> StringToV8(
v8::Isolate* isolate,
const base::StringPiece& input) {
return ConvertToV8(isolate, input).As<v8::String>();
}
-GIN_EXPORT v8::Handle<v8::String> StringToSymbol(v8::Isolate* isolate,
+GIN_EXPORT v8::Local<v8::String> StringToSymbol(v8::Isolate* isolate,
const base::StringPiece& val);
template<typename T>
-bool ConvertFromV8(v8::Isolate* isolate, v8::Handle<v8::Value> input,
+bool ConvertFromV8(v8::Isolate* isolate, v8::Local<v8::Value> input,
T* result) {
return Converter<T>::FromV8(isolate, input, result);
}
-GIN_EXPORT std::string V8ToString(v8::Handle<v8::Value> value);
+GIN_EXPORT std::string V8ToString(v8::Local<v8::Value> value);
} // namespace gin
diff --git a/gin/converter_unittest.cc b/gin/converter_unittest.cc
index f8011d6..6ac3087 100644
--- a/gin/converter_unittest.cc
+++ b/gin/converter_unittest.cc
@@ -79,7 +79,7 @@
}
struct {
- v8::Handle<v8::Value> input;
+ v8::Local<v8::Value> input;
bool expect_sucess;
int expected_result;
} test_data_from[] = {
diff --git a/gin/dictionary.cc b/gin/dictionary.cc
index d3361228..018a82c66 100644
--- a/gin/dictionary.cc
+++ b/gin/dictionary.cc
@@ -11,7 +11,7 @@
}
Dictionary::Dictionary(v8::Isolate* isolate,
- v8::Handle<v8::Object> object)
+ v8::Local<v8::Object> object)
: isolate_(isolate),
object_(object) {
}
@@ -25,17 +25,17 @@
return dictionary;
}
-v8::Handle<v8::Value> Converter<Dictionary>::ToV8(v8::Isolate* isolate,
+v8::Local<v8::Value> Converter<Dictionary>::ToV8(v8::Isolate* isolate,
Dictionary val) {
return val.object_;
}
bool Converter<Dictionary>::FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
Dictionary* out) {
if (!val->IsObject())
return false;
- *out = Dictionary(isolate, v8::Handle<v8::Object>::Cast(val));
+ *out = Dictionary(isolate, v8::Local<v8::Object>::Cast(val));
return true;
}
diff --git a/gin/dictionary.h b/gin/dictionary.h
index 972108f..efebfa8 100644
--- a/gin/dictionary.h
+++ b/gin/dictionary.h
@@ -25,14 +25,14 @@
class GIN_EXPORT Dictionary {
public:
explicit Dictionary(v8::Isolate* isolate);
- Dictionary(v8::Isolate* isolate, v8::Handle<v8::Object> object);
+ Dictionary(v8::Isolate* isolate, v8::Local<v8::Object> object);
~Dictionary();
static Dictionary CreateEmpty(v8::Isolate* isolate);
template<typename T>
bool Get(const std::string& key, T* out) {
- v8::Handle<v8::Value> val = object_->Get(StringToV8(isolate_, key));
+ v8::Local<v8::Value> val = object_->Get(StringToV8(isolate_, key));
return ConvertFromV8(isolate_, val, out);
}
@@ -48,15 +48,15 @@
// TODO(aa): Remove this. Instead, get via FromV8(), Set(), and Get().
v8::Isolate* isolate_;
- v8::Handle<v8::Object> object_;
+ v8::Local<v8::Object> object_;
};
template<>
struct GIN_EXPORT Converter<Dictionary> {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
Dictionary val);
static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
Dictionary* out);
};
diff --git a/gin/function_template.cc b/gin/function_template.cc
index 7b85170..46285f9 100644
--- a/gin/function_template.cc
+++ b/gin/function_template.cc
@@ -18,7 +18,7 @@
DCHECK(v8_ref_.IsEmpty());
}
-v8::Handle<v8::External> CallbackHolderBase::GetHandle(v8::Isolate* isolate) {
+v8::Local<v8::External> CallbackHolderBase::GetHandle(v8::Isolate* isolate) {
return v8::Local<v8::External>::New(isolate, v8_ref_);
}
diff --git a/gin/function_template.h b/gin/function_template.h
index 1c8e2be..15ea8fe 100644
--- a/gin/function_template.h
+++ b/gin/function_template.h
@@ -44,7 +44,7 @@
// among every CallbackHolder instance.
class GIN_EXPORT CallbackHolderBase {
public:
- v8::Handle<v8::External> GetHandle(v8::Isolate* isolate);
+ v8::Local<v8::External> GetHandle(v8::Isolate* isolate);
protected:
explicit CallbackHolderBase(v8::Isolate* isolate);
@@ -200,7 +200,7 @@
static void DispatchToCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) {
Arguments args(info);
- v8::Handle<v8::External> v8_holder;
+ v8::Local<v8::External> v8_holder;
CHECK(args.GetData(&v8_holder));
CallbackHolderBase* holder_base = reinterpret_cast<CallbackHolderBase*>(
v8_holder->Value());
@@ -237,7 +237,7 @@
return v8::FunctionTemplate::New(
isolate,
&internal::Dispatcher<Sig>::DispatchToCallback,
- ConvertToV8<v8::Handle<v8::External> >(isolate,
+ ConvertToV8<v8::Local<v8::External> >(isolate,
holder->GetHandle(isolate)));
}
@@ -251,7 +251,7 @@
typedef internal::CallbackHolder<Sig> HolderT;
HolderT* holder = new HolderT(isolate, callback, callback_flags);
tmpl->SetCallAsFunctionHandler(&internal::Dispatcher<Sig>::DispatchToCallback,
- ConvertToV8<v8::Handle<v8::External> >(
+ ConvertToV8<v8::Local<v8::External> >(
isolate, holder->GetHandle(isolate)));
}
diff --git a/gin/handle.h b/gin/handle.h
index 01db660..e553e4b6 100644
--- a/gin/handle.h
+++ b/gin/handle.h
@@ -18,7 +18,7 @@
public:
Handle() : object_(NULL) {}
- Handle(v8::Handle<v8::Value> wrapper, T* object)
+ Handle(v8::Local<v8::Value> wrapper, T* object)
: wrapper_(wrapper),
object_(object) {
}
@@ -31,21 +31,21 @@
}
T* operator->() const { return object_; }
- v8::Handle<v8::Value> ToV8() const { return wrapper_; }
+ v8::Local<v8::Value> ToV8() const { return wrapper_; }
T* get() const { return object_; }
private:
- v8::Handle<v8::Value> wrapper_;
+ v8::Local<v8::Value> wrapper_;
T* object_;
};
template<typename T>
struct Converter<gin::Handle<T> > {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const gin::Handle<T>& val) {
return val.ToV8();
}
- static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
+ static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
gin::Handle<T>* out) {
T* object = NULL;
if (!Converter<T*>::FromV8(isolate, val, &object)) {
@@ -60,7 +60,7 @@
// without having to write out the type of the object explicitly.
template<typename T>
gin::Handle<T> CreateHandle(v8::Isolate* isolate, T* object) {
- v8::Handle<v8::Object> wrapper = object->GetWrapper(isolate);
+ v8::Local<v8::Object> wrapper = object->GetWrapper(isolate);
if (wrapper.IsEmpty())
return gin::Handle<T>();
return gin::Handle<T>(wrapper, object);
diff --git a/gin/interceptor_unittest.cc b/gin/interceptor_unittest.cc
index af830d4..01c6ba95 100644
--- a/gin/interceptor_unittest.cc
+++ b/gin/interceptor_unittest.cc
@@ -136,17 +136,17 @@
obj->set_value(42);
EXPECT_EQ(42, obj->value());
- v8::Handle<v8::String> source = StringToV8(isolate, script_source);
+ v8::Local<v8::String> source = StringToV8(isolate, script_source);
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[] = {ConvertToV8(isolate, obj.get()), };
+ v8::Local<v8::Value> argv[] = {ConvertToV8(isolate, obj.get()), };
func->Call(v8::Undefined(isolate), 1, argv);
EXPECT_FALSE(try_catch.HasCaught());
EXPECT_EQ("", try_catch.GetStackTrace());
diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
index f649d34..264552f9 100644
--- a/gin/object_template_builder.cc
+++ b/gin/object_template_builder.cc
@@ -13,10 +13,10 @@
namespace {
WrappableBase* WrappableFromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val) {
+ v8::Local<v8::Value> val) {
if (!val->IsObject())
return NULL;
- v8::Handle<v8::Object> obj = v8::Handle<v8::Object>::Cast(val);
+ v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(val);
WrapperInfo* info = WrapperInfo::From(obj);
// If this fails, the object is not managed by Gin.
@@ -31,7 +31,7 @@
}
NamedPropertyInterceptor* NamedInterceptorFromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val) {
+ v8::Local<v8::Value> val) {
WrappableBase* base = WrappableFromV8(isolate, val);
if (!base)
return NULL;
@@ -40,7 +40,7 @@
IndexedPropertyInterceptor* IndexedInterceptorFromV8(
v8::Isolate* isolate,
- v8::Handle<v8::Value> val) {
+ v8::Local<v8::Value> val) {
WrappableBase* base = WrappableFromV8(isolate, val);
if (!base)
return NULL;
@@ -93,7 +93,7 @@
NamedInterceptorFromV8(isolate, info.Holder());
if (!interceptor)
return;
- info.GetReturnValue().Set(v8::Handle<v8::Array>::Cast(
+ info.GetReturnValue().Set(v8::Local<v8::Array>::Cast(
ConvertToV8(isolate, interceptor->EnumerateNamedProperties(isolate))));
}
@@ -126,7 +126,7 @@
IndexedInterceptorFromV8(isolate, info.Holder());
if (!interceptor)
return;
- info.GetReturnValue().Set(v8::Handle<v8::Array>::Cast(
+ info.GetReturnValue().Set(v8::Local<v8::Array>::Cast(
ConvertToV8(isolate, interceptor->EnumerateIndexedProperties(isolate))));
}
@@ -159,14 +159,14 @@
}
ObjectTemplateBuilder& ObjectTemplateBuilder::SetImpl(
- const base::StringPiece& name, v8::Handle<v8::Data> val) {
+ const base::StringPiece& name, v8::Local<v8::Data> val) {
template_->Set(StringToSymbol(isolate_, name), val);
return *this;
}
ObjectTemplateBuilder& ObjectTemplateBuilder::SetPropertyImpl(
- const base::StringPiece& name, v8::Handle<v8::FunctionTemplate> getter,
- v8::Handle<v8::FunctionTemplate> setter) {
+ const base::StringPiece& name, v8::Local<v8::FunctionTemplate> getter,
+ v8::Local<v8::FunctionTemplate> setter) {
template_->SetAccessorProperty(StringToSymbol(isolate_, name), getter,
setter);
return *this;
diff --git a/gin/object_template_builder.h b/gin/object_template_builder.h
index 1305d5c..1e53d83 100644
--- a/gin/object_template_builder.h
+++ b/gin/object_template_builder.h
@@ -23,7 +23,7 @@
// because of base::Bind().
template<typename T, typename Enable = void>
struct CallbackTraits {
- static v8::Handle<v8::FunctionTemplate> CreateTemplate(v8::Isolate* isolate,
+ static v8::Local<v8::FunctionTemplate> CreateTemplate(v8::Isolate* isolate,
T callback) {
return CreateFunctionTemplate(isolate, base::Bind(callback));
}
@@ -37,7 +37,7 @@
// Specialization for base::Callback.
template<typename T>
struct CallbackTraits<base::Callback<T> > {
- static v8::Handle<v8::FunctionTemplate> CreateTemplate(
+ static v8::Local<v8::FunctionTemplate> CreateTemplate(
v8::Isolate* isolate, const base::Callback<T>& callback) {
return CreateFunctionTemplate(isolate, callback);
}
@@ -55,7 +55,7 @@
template<typename T>
struct CallbackTraits<T, typename base::enable_if<
base::is_member_function_pointer<T>::value>::type> {
- static v8::Handle<v8::FunctionTemplate> CreateTemplate(v8::Isolate* isolate,
+ static v8::Local<v8::FunctionTemplate> CreateTemplate(v8::Isolate* isolate,
T callback) {
return CreateFunctionTemplate(isolate, base::Bind(callback),
HolderIsFirstArgument);
@@ -71,9 +71,9 @@
// This specialization allows people to construct function templates directly if
// they need to do fancier stuff.
template<>
-struct CallbackTraits<v8::Handle<v8::FunctionTemplate> > {
- static v8::Handle<v8::FunctionTemplate> CreateTemplate(
- v8::Handle<v8::FunctionTemplate> templ) {
+struct CallbackTraits<v8::Local<v8::FunctionTemplate> > {
+ static v8::Local<v8::FunctionTemplate> CreateTemplate(
+ v8::Local<v8::FunctionTemplate> templ) {
return templ;
}
};
@@ -131,10 +131,10 @@
private:
ObjectTemplateBuilder& SetImpl(const base::StringPiece& name,
- v8::Handle<v8::Data> val);
+ v8::Local<v8::Data> val);
ObjectTemplateBuilder& SetPropertyImpl(
- const base::StringPiece& name, v8::Handle<v8::FunctionTemplate> getter,
- v8::Handle<v8::FunctionTemplate> setter);
+ const base::StringPiece& name, v8::Local<v8::FunctionTemplate> getter,
+ v8::Local<v8::FunctionTemplate> setter);
v8::Isolate* isolate_;
diff --git a/gin/per_context_data.cc b/gin/per_context_data.cc
index 178c0d1..8185d3f 100644
--- a/gin/per_context_data.cc
+++ b/gin/per_context_data.cc
@@ -11,7 +11,7 @@
namespace gin {
PerContextData::PerContextData(ContextHolder* context_holder,
- v8::Handle<v8::Context> context)
+ v8::Local<v8::Context> context)
: context_holder_(context_holder),
runner_(NULL) {
context->SetAlignedPointerInEmbedderData(
@@ -25,7 +25,7 @@
}
// static
-PerContextData* PerContextData::From(v8::Handle<v8::Context> context) {
+PerContextData* PerContextData::From(v8::Local<v8::Context> context) {
return static_cast<PerContextData*>(
context->GetAlignedPointerFromEmbedderData(kEncodedValueIndex));
}
diff --git a/gin/per_context_data.h b/gin/per_context_data.h
index de8f179..976ef51 100644
--- a/gin/per_context_data.h
+++ b/gin/per_context_data.h
@@ -23,11 +23,11 @@
class GIN_EXPORT PerContextData : public base::SupportsUserData {
public:
PerContextData(ContextHolder* context_holder,
- v8::Handle<v8::Context> context);
+ v8::Local<v8::Context> context);
~PerContextData() override;
// Can return NULL after the ContextHolder has detached from context.
- static PerContextData* From(v8::Handle<v8::Context> context);
+ static PerContextData* From(v8::Local<v8::Context> context);
// The Runner associated with this context. To execute script in this context,
// please use the appropriate API on Runner.
diff --git a/gin/per_context_data_unittest.cc b/gin/per_context_data_unittest.cc
index 4d795871..831ad1cb 100644
--- a/gin/per_context_data_unittest.cc
+++ b/gin/per_context_data_unittest.cc
@@ -18,8 +18,8 @@
TEST_F(PerContextDataTest, LookupAndDestruction) {
v8::Isolate::Scope isolate_scope(instance_->isolate());
v8::HandleScope handle_scope(instance_->isolate());
- v8::Handle<v8::Context> context = v8::Context::New(
- instance_->isolate(), NULL, v8::Handle<v8::ObjectTemplate>());
+ v8::Local<v8::Context> context = v8::Context::New(
+ instance_->isolate(), NULL, v8::Local<v8::ObjectTemplate>());
{
ContextHolder context_holder(instance_->isolate());
context_holder.SetContext(context);
diff --git a/gin/public/context_holder.h b/gin/public/context_holder.h
index b055b9680..835bffa 100644
--- a/gin/public/context_holder.h
+++ b/gin/public/context_holder.h
@@ -33,11 +33,11 @@
v8::Isolate* isolate() const { return isolate_; }
- v8::Handle<v8::Context> context() const {
+ v8::Local<v8::Context> context() const {
return v8::Local<v8::Context>::New(isolate_, context_);
}
- void SetContext(v8::Handle<v8::Context> context);
+ void SetContext(v8::Local<v8::Context> context);
private:
v8::Isolate* isolate_;
diff --git a/gin/public/wrapper_info.h b/gin/public/wrapper_info.h
index 31b2a98..4a1f55f 100644
--- a/gin/public/wrapper_info.h
+++ b/gin/public/wrapper_info.h
@@ -23,7 +23,7 @@
};
struct GIN_EXPORT WrapperInfo {
- static WrapperInfo* From(v8::Handle<v8::Object> object);
+ static WrapperInfo* From(v8::Local<v8::Object> object);
const GinEmbedder embedder;
};
diff --git a/gin/runner.h b/gin/runner.h
index 36a75d2f95..3199569 100644
--- a/gin/runner.h
+++ b/gin/runner.h
@@ -24,13 +24,13 @@
// context by creating an instance of Runner::Scope on the stack.
virtual void Run(const std::string& source,
const std::string& resource_name) = 0;
- virtual v8::Handle<v8::Value> Call(v8::Handle<v8::Function> function,
- v8::Handle<v8::Value> receiver,
+ virtual v8::Local<v8::Value> Call(v8::Local<v8::Function> function,
+ v8::Local<v8::Value> receiver,
int argc,
- v8::Handle<v8::Value> argv[]) = 0;
+ v8::Local<v8::Value> argv[]) = 0;
virtual ContextHolder* GetContextHolder() = 0;
- v8::Handle<v8::Object> global() {
+ v8::Local<v8::Object> global() {
return GetContextHolder()->context()->Global();
}
diff --git a/gin/shell_runner.cc b/gin/shell_runner.cc
index 8d98e425..eccee9f6 100644
--- a/gin/shell_runner.cc
+++ b/gin/shell_runner.cc
@@ -25,10 +25,10 @@
ShellRunnerDelegate::~ShellRunnerDelegate() {
}
-v8::Handle<ObjectTemplate> ShellRunnerDelegate::GetGlobalTemplate(
+v8::Local<ObjectTemplate> ShellRunnerDelegate::GetGlobalTemplate(
ShellRunner* runner,
v8::Isolate* isolate) {
- return v8::Handle<ObjectTemplate>();
+ return v8::Local<ObjectTemplate>();
}
void ShellRunnerDelegate::DidCreateContext(ShellRunner* runner) {
@@ -49,7 +49,7 @@
: delegate_(delegate) {
v8::Isolate::Scope isolate_scope(isolate);
HandleScope handle_scope(isolate);
- v8::Handle<v8::Context> context =
+ v8::Local<v8::Context> context =
Context::New(isolate, NULL, delegate_->GetGlobalTemplate(this, isolate));
context_holder_.reset(new ContextHolder(isolate));
@@ -67,7 +67,7 @@
const std::string& resource_name) {
TryCatch try_catch;
v8::Isolate* isolate = GetContextHolder()->isolate();
- v8::Handle<Script> script = Script::Compile(
+ v8::Local<Script> script = Script::Compile(
StringToV8(isolate, source), StringToV8(isolate, resource_name));
if (try_catch.HasCaught()) {
delegate_->UnhandledException(this, try_catch);
@@ -77,14 +77,14 @@
Run(script);
}
-v8::Handle<v8::Value> ShellRunner::Call(v8::Handle<v8::Function> function,
- v8::Handle<v8::Value> receiver,
+v8::Local<v8::Value> ShellRunner::Call(v8::Local<v8::Function> function,
+ v8::Local<v8::Value> receiver,
int argc,
- v8::Handle<v8::Value> argv[]) {
+ v8::Local<v8::Value> argv[]) {
TryCatch try_catch;
delegate_->WillRunScript(this);
- v8::Handle<v8::Value> result = function->Call(receiver, argc, argv);
+ v8::Local<v8::Value> result = function->Call(receiver, argc, argv);
delegate_->DidRunScript(this);
if (try_catch.HasCaught())
@@ -97,7 +97,7 @@
return context_holder_.get();
}
-void ShellRunner::Run(v8::Handle<Script> script) {
+void ShellRunner::Run(v8::Local<Script> script) {
TryCatch try_catch;
delegate_->WillRunScript(this);
diff --git a/gin/shell_runner.h b/gin/shell_runner.h
index 9a5b4ef..e150feac 100644
--- a/gin/shell_runner.h
+++ b/gin/shell_runner.h
@@ -22,7 +22,7 @@
virtual ~ShellRunnerDelegate();
// Returns the template for the global object.
- virtual v8::Handle<v8::ObjectTemplate> GetGlobalTemplate(
+ virtual v8::Local<v8::ObjectTemplate> GetGlobalTemplate(
ShellRunner* runner,
v8::Isolate* isolate);
virtual void DidCreateContext(ShellRunner* runner);
@@ -45,16 +45,16 @@
// Runner overrides:
void Run(const std::string& source,
const std::string& resource_name) override;
- v8::Handle<v8::Value> Call(v8::Handle<v8::Function> function,
- v8::Handle<v8::Value> receiver,
+ v8::Local<v8::Value> Call(v8::Local<v8::Function> function,
+ v8::Local<v8::Value> receiver,
int argc,
- v8::Handle<v8::Value> argv[]) override;
+ v8::Local<v8::Value> argv[]) override;
ContextHolder* GetContextHolder() override;
private:
friend class Scope;
- void Run(v8::Handle<v8::Script> script);
+ void Run(v8::Local<v8::Script> script);
ShellRunnerDelegate* delegate_;
diff --git a/gin/test/file.cc b/gin/test/file.cc
index 0ed24e3e..adcb341 100644
--- a/gin/test/file.cc
+++ b/gin/test/file.cc
@@ -23,7 +23,7 @@
namespace {
-v8::Handle<v8::Value> ReadFileToString(gin::Arguments* args) {
+v8::Local<v8::Value> ReadFileToString(gin::Arguments* args) {
std::string filename;
if (!args->GetNext(&filename))
return v8::Null(args->isolate());
@@ -36,7 +36,7 @@
return gin::Converter<std::string>::ToV8(args->isolate(), contents);
}
-v8::Handle<v8::Value> GetSourceRootDirectory(gin::Arguments* args) {
+v8::Local<v8::Value> GetSourceRootDirectory(gin::Arguments* args) {
base::FilePath path;
if (!PathService::Get(base::DIR_SOURCE_ROOT, &path))
return v8::Null(args->isolate());
@@ -44,7 +44,7 @@
path.AsUTF8Unsafe());
}
-v8::Handle<v8::Value> GetFilesInDirectory(gin::Arguments* args) {
+v8::Local<v8::Value> GetFilesInDirectory(gin::Arguments* args) {
std::string filename;
if (!args->GetNext(&filename))
return v8::Null(args->isolate());
diff --git a/gin/test/file_runner.cc b/gin/test/file_runner.cc
index 723ab98d..8ed0f212 100644
--- a/gin/test/file_runner.cc
+++ b/gin/test/file_runner.cc
@@ -79,7 +79,7 @@
message_loop.Run();
}
- v8::Handle<v8::Value> result = runner.global()->Get(
+ v8::Local<v8::Value> result = runner.global()->Get(
StringToSymbol(runner.GetContextHolder()->isolate(), "result"));
EXPECT_EQ("PASS", V8ToString(result));
}
diff --git a/gin/test/gtest.cc b/gin/test/gtest.cc
index b4060a3..76aaf1f 100644
--- a/gin/test/gtest.cc
+++ b/gin/test/gtest.cc
@@ -31,8 +31,8 @@
EXPECT_FALSE(condition) << description;
}
-void ExpectEqual(const v8::Handle<v8::Value> expected,
- const v8::Handle<v8::Value> actual,
+void ExpectEqual(const v8::Local<v8::Value> expected,
+ const v8::Local<v8::Value> actual,
const std::string& description) {
EXPECT_TRUE(expected->StrictEquals(actual)) << description;
}
diff --git a/gin/try_catch.cc b/gin/try_catch.cc
index a44e28e..97e7fe15 100644
--- a/gin/try_catch.cc
+++ b/gin/try_catch.cc
@@ -26,17 +26,17 @@
}
std::stringstream ss;
- v8::Handle<v8::Message> message = try_catch_.Message();
+ v8::Local<v8::Message> message = try_catch_.Message();
ss << V8ToString(message->Get()) << std::endl
<< V8ToString(message->GetSourceLine()) << std::endl;
- v8::Handle<v8::StackTrace> trace = message->GetStackTrace();
+ v8::Local<v8::StackTrace> trace = message->GetStackTrace();
if (trace.IsEmpty())
return ss.str();
int len = trace->GetFrameCount();
for (int i = 0; i < len; ++i) {
- v8::Handle<v8::StackFrame> frame = trace->GetFrame(i);
+ v8::Local<v8::StackFrame> frame = trace->GetFrame(i);
ss << V8ToString(frame->GetScriptName()) << ":"
<< frame->GetLineNumber() << ":"
<< frame->GetColumn() << ": "
diff --git a/gin/wrappable.cc b/gin/wrappable.cc
index 4137609..09c17a3 100644
--- a/gin/wrappable.cc
+++ b/gin/wrappable.cc
@@ -35,7 +35,7 @@
delete wrappable;
}
-v8::Handle<v8::Object> WrappableBase::GetWrapperImpl(v8::Isolate* isolate,
+v8::Local<v8::Object> WrappableBase::GetWrapperImpl(v8::Isolate* isolate,
WrapperInfo* info) {
if (!wrapper_.IsEmpty()) {
return v8::Local<v8::Object>::New(isolate, wrapper_);
@@ -49,7 +49,7 @@
data->SetObjectTemplate(info, templ);
}
CHECK_EQ(kNumberOfInternalFields, templ->InternalFieldCount());
- v8::Handle<v8::Object> wrapper = templ->NewInstance();
+ v8::Local<v8::Object> wrapper = templ->NewInstance();
// |wrapper| may be empty in some extreme cases, e.g., when
// Object.prototype.constructor is overwritten.
if (wrapper.IsEmpty()) {
@@ -67,11 +67,11 @@
namespace internal {
-void* FromV8Impl(v8::Isolate* isolate, v8::Handle<v8::Value> val,
+void* FromV8Impl(v8::Isolate* isolate, v8::Local<v8::Value> val,
WrapperInfo* wrapper_info) {
if (!val->IsObject())
return NULL;
- v8::Handle<v8::Object> obj = v8::Handle<v8::Object>::Cast(val);
+ v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(val);
WrapperInfo* info = WrapperInfo::From(obj);
// If this fails, the object is not managed by Gin. It is either a normal JS
diff --git a/gin/wrappable.h b/gin/wrappable.h
index ea4edcf..cd4d30e 100644
--- a/gin/wrappable.h
+++ b/gin/wrappable.h
@@ -15,7 +15,7 @@
namespace internal {
GIN_EXPORT void* FromV8Impl(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
WrapperInfo* info);
} // namespace internal
@@ -64,7 +64,7 @@
virtual ObjectTemplateBuilder GetObjectTemplateBuilder(v8::Isolate* isolate);
- v8::Handle<v8::Object> GetWrapperImpl(v8::Isolate* isolate,
+ v8::Local<v8::Object> GetWrapperImpl(v8::Isolate* isolate,
WrapperInfo* wrapper_info);
private:
@@ -85,7 +85,7 @@
// Retrieve (or create) the v8 wrapper object cooresponding to this object.
// To customize the wrapper created for a subclass, override GetWrapperInfo()
// instead of overriding this function.
- v8::Handle<v8::Object> GetWrapper(v8::Isolate* isolate) {
+ v8::Local<v8::Object> GetWrapper(v8::Isolate* isolate) {
return GetWrapperImpl(isolate, &T::kWrapperInfo);
}
@@ -102,11 +102,11 @@
template<typename T>
struct Converter<T*, typename base::enable_if<
base::is_convertible<T*, WrappableBase*>::value>::type> {
- static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate, T* val) {
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate, T* val) {
return val->GetWrapper(isolate);
}
- static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val, T** out) {
+ static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val, T** out) {
*out = static_cast<T*>(static_cast<WrappableBase*>(
internal::FromV8Impl(isolate, val, &T::kWrapperInfo)));
return *out != NULL;
diff --git a/gin/wrappable_unittest.cc b/gin/wrappable_unittest.cc
index ef0dce4..3d795716 100644
--- a/gin/wrappable_unittest.cc
+++ b/gin/wrappable_unittest.cc
@@ -132,7 +132,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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);
diff --git a/gin/wrapper_info.cc b/gin/wrapper_info.cc
index 6bf8316..8e8f5b7 100644
--- a/gin/wrapper_info.cc
+++ b/gin/wrapper_info.cc
@@ -6,7 +6,7 @@
namespace gin {
-WrapperInfo* WrapperInfo::From(v8::Handle<v8::Object> object) {
+WrapperInfo* WrapperInfo::From(v8::Local<v8::Object> object) {
if (object->InternalFieldCount() != kNumberOfInternalFields)
return NULL;
WrapperInfo* info = static_cast<WrapperInfo*>(