Commit 4e45e960 authored by Jérémy Lal's avatar Jérémy Lal

Imported Upstream version 2.3.5

parent 17debd72
test/
examples/
.dntrc
.travis.yml
.npmignore
appveyor.yml
Makefile
cpplint.py
doc/.build.sh
......@@ -14,9 +14,9 @@ env:
- TRAVIS_NODE_VERSION="0.8"
- TRAVIS_NODE_VERSION="0.10"
- TRAVIS_NODE_VERSION="0.12"
- TRAVIS_NODE_VERSION="iojs-3"
- TRAVIS_NODE_VERSION="4"
- TRAVIS_NODE_VERSION="5"
- TRAVIS_NODE_VERSION="6"
notifications:
email:
- rod@vagg.org
......
# NAN ChangeLog
**Version 2.3.0: current Node 6.0.0, Node 12: 0.12.13, Node 10: 0.10.44, iojs: 3.3.1**
**Version 2.3.5: current Node 6.2.0, Node 12: 0.12.14, Node 10: 0.10.45, iojs: 3.3.1**
### 2.3.5 May 31 2016
- Bugfix: Replace NAN_INLINE with 'inline' keyword. 71819d8725f822990f439479c9aba3b240804909
### 2.3.4 May 31 2016
- Bugfix: Remove V8 deprecation warnings 0592fb0a47f3a1c7763087ebea8e1138829f24f9
- Bugfix: Fix new versions not to use WeakCallbackInfo::IsFirstPass 615c19d9e03d4be2049c10db0151edbc3b229246
- Bugfix: Make ObjectWrap::handle() const d19af99595587fe7a26bd850af6595c2a7145afc
- Bugfix: Fix compilation errors related to 0592fb0a47f3a1c7763087ebea8e1138829f24f9 e9191c525b94f652718325e28610a1adcf90fed8
### 2.3.3 May 4 2016
- Bugfix: Refactor SetMethod() to deal with v8::Templates (#566) b9083cf6d5de6ebe6bcb49c7502fbb7c0d9ddda8
### 2.3.2 Apr 27 2016
- Bugfix: Fix compilation on outdated versions due to Handle removal f8b7c875d04d425a41dfd4f3f8345bc3a11e6c52
### 2.3.1 Apr 27 2016
- Bugfix: Don't use deprecated v8::Template::Set() in SetMethod a90951e9ea70fa1b3836af4b925322919159100e
### 2.3.0 Apr 27 2016
......
......@@ -3,7 +3,7 @@ Native Abstractions for Node.js
**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10, 0.12, 1, 4, 5 and 6.**
***Current version: 2.3.0***
***Current version: 2.3.5***
*(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)*
......
......@@ -7,9 +7,9 @@ environment:
- nodejs_version: "0.8"
- nodejs_version: "0.10"
- nodejs_version: "0.12"
- nodejs_version: "3"
- nodejs_version: "4"
- nodejs_version: "5"
- nodejs_version: "6"
# Install scripts. (runs after repo cloning)
install:
......
......@@ -474,9 +474,12 @@ Sets a method with a given name directly on a JavaScript object where the method
Signature:
```c++
template<typename T> void Nan::SetMethod(const T &recv,
const char *name,
Nan::FunctionCallback callback)
void Nan::SetMethod(v8::Local<v8::Object> recv,
const char *name,
Nan::FunctionCallback callback)
void Nan::SetMethod(v8::Local<v8::Template> templ,
const char *name,
Nan::FunctionCallback callback)
```
<a name="api_nan_set_prototype_method"></a>
......
This diff is collapsed.
......@@ -275,7 +275,7 @@ class ReturnValueImp : public ReturnValue<T> {
public:
explicit ReturnValueImp(ReturnValue<T> that) :
ReturnValue<T>(that) {}
NAN_INLINE v8::Handle<T> Value() {
inline v8::Handle<T> Value() {
return *ReturnValue<T>::value_;
}
};
......
......@@ -49,7 +49,7 @@ X(int32_t)
} // end of namespace imp
template<typename T>
NAN_INLINE
inline
typename imp::ToFactory<T>::return_t To(v8::Local<v8::Value> val) {
return imp::ToFactory<T>::convert(val);
}
......
......@@ -37,7 +37,12 @@ Factory<v8::Boolean>::New(bool value) {
Factory<v8::BooleanObject>::return_t
Factory<v8::BooleanObject>::New(bool value) {
#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
return v8::BooleanObject::New(
v8::Isolate::GetCurrent(), value).As<v8::BooleanObject>();
#else
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
#endif
}
//=== Context ==================================================================
......
......@@ -16,38 +16,38 @@ template<typename T>
using Maybe = v8::Maybe<T>;
template<typename T>
NAN_INLINE Maybe<T> Nothing() {
inline Maybe<T> Nothing() {
return v8::Nothing<T>();
}
template<typename T>
NAN_INLINE Maybe<T> Just(const T& t) {
inline Maybe<T> Just(const T& t) {
return v8::Just<T>(t);
}
v8::Local<v8::Context> GetCurrentContext();
NAN_INLINE
inline
MaybeLocal<v8::String> ToDetailString(v8::Local<v8::Value> val) {
return val->ToDetailString(GetCurrentContext());
}
NAN_INLINE
inline
MaybeLocal<v8::Uint32> ToArrayIndex(v8::Local<v8::Value> val) {
return val->ToArrayIndex(GetCurrentContext());
}
NAN_INLINE
inline
Maybe<bool> Equals(v8::Local<v8::Value> a, v8::Local<v8::Value>(b)) {
return a->Equals(GetCurrentContext(), b);
}
NAN_INLINE
inline
MaybeLocal<v8::Object> NewInstance(v8::Local<v8::Function> h) {
return h->NewInstance(GetCurrentContext());
}
NAN_INLINE
inline
MaybeLocal<v8::Object> NewInstance(
v8::Local<v8::Function> h
, int argc
......@@ -55,32 +55,32 @@ MaybeLocal<v8::Object> NewInstance(
return h->NewInstance(GetCurrentContext(), argc, argv);
}
NAN_INLINE
inline
MaybeLocal<v8::Object> NewInstance(v8::Local<v8::ObjectTemplate> h) {
return h->NewInstance(GetCurrentContext());
}
NAN_INLINE MaybeLocal<v8::Function> GetFunction(
inline MaybeLocal<v8::Function> GetFunction(
v8::Local<v8::FunctionTemplate> t) {
return t->GetFunction(GetCurrentContext());
}
NAN_INLINE Maybe<bool> Set(
inline Maybe<bool> Set(
v8::Local<v8::Object> obj
, v8::Local<v8::Value> key
, v8::Local<v8::Value> value) {
return obj->Set(GetCurrentContext(), key, value);
}
NAN_INLINE Maybe<bool> Set(
inline Maybe<bool> Set(
v8::Local<v8::Object> obj
, uint32_t index
, v8::Local<v8::Value> value) {
return obj->Set(GetCurrentContext(), index, value);
}
NAN_INLINE Maybe<bool> ForceSet(
inline Maybe<bool> ForceSet(
v8::Local<v8::Object> obj
, v8::Local<v8::Value> key
, v8::Local<v8::Value> value
......@@ -88,102 +88,102 @@ NAN_INLINE Maybe<bool> ForceSet(
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
}
NAN_INLINE MaybeLocal<v8::Value> Get(
inline MaybeLocal<v8::Value> Get(
v8::Local<v8::Object> obj
, v8::Local<v8::Value> key) {
return obj->Get(GetCurrentContext(), key);
}
NAN_INLINE
inline
MaybeLocal<v8::Value> Get(v8::Local<v8::Object> obj, uint32_t index) {
return obj->Get(GetCurrentContext(), index);
}
NAN_INLINE v8::PropertyAttribute GetPropertyAttributes(
inline v8::PropertyAttribute GetPropertyAttributes(
v8::Local<v8::Object> obj
, v8::Local<v8::Value> key) {
return obj->GetPropertyAttributes(GetCurrentContext(), key).FromJust();
}
NAN_INLINE Maybe<bool> Has(
inline Maybe<bool> Has(
v8::Local<v8::Object> obj
, v8::Local<v8::String> key) {
return obj->Has(GetCurrentContext(), key);
}
NAN_INLINE Maybe<bool> Has(v8::Local<v8::Object> obj, uint32_t index) {
inline Maybe<bool> Has(v8::Local<v8::Object> obj, uint32_t index) {
return obj->Has(GetCurrentContext(), index);
}
NAN_INLINE Maybe<bool> Delete(
inline Maybe<bool> Delete(
v8::Local<v8::Object> obj
, v8::Local<v8::String> key) {
return obj->Delete(GetCurrentContext(), key);
}
NAN_INLINE
inline
Maybe<bool> Delete(v8::Local<v8::Object> obj, uint32_t index) {
return obj->Delete(GetCurrentContext(), index);
}
NAN_INLINE
inline
MaybeLocal<v8::Array> GetPropertyNames(v8::Local<v8::Object> obj) {
return obj->GetPropertyNames(GetCurrentContext());
}
NAN_INLINE
inline
MaybeLocal<v8::Array> GetOwnPropertyNames(v8::Local<v8::Object> obj) {
return obj->GetOwnPropertyNames(GetCurrentContext());
}
NAN_INLINE Maybe<bool> SetPrototype(
inline Maybe<bool> SetPrototype(
v8::Local<v8::Object> obj
, v8::Local<v8::Value> prototype) {
return obj->SetPrototype(GetCurrentContext(), prototype);
}
NAN_INLINE MaybeLocal<v8::String> ObjectProtoToString(
inline MaybeLocal<v8::String> ObjectProtoToString(
v8::Local<v8::Object> obj) {
return obj->ObjectProtoToString(GetCurrentContext());
}
NAN_INLINE Maybe<bool> HasOwnProperty(
inline Maybe<bool> HasOwnProperty(
v8::Local<v8::Object> obj
, v8::Local<v8::String> key) {
return obj->HasOwnProperty(GetCurrentContext(), key);
}
NAN_INLINE Maybe<bool> HasRealNamedProperty(
inline Maybe<bool> HasRealNamedProperty(
v8::Local<v8::Object> obj
, v8::Local<v8::String> key) {
return obj->HasRealNamedProperty(GetCurrentContext(), key);
}
NAN_INLINE Maybe<bool> HasRealIndexedProperty(
inline Maybe<bool> HasRealIndexedProperty(
v8::Local<v8::Object> obj
, uint32_t index) {
return obj->HasRealIndexedProperty(GetCurrentContext(), index);
}
NAN_INLINE Maybe<bool> HasRealNamedCallbackProperty(
inline Maybe<bool> HasRealNamedCallbackProperty(
v8::Local<v8::Object> obj
, v8::Local<v8::String> key) {
return obj->HasRealNamedCallbackProperty(GetCurrentContext(), key);
}
NAN_INLINE MaybeLocal<v8::Value> GetRealNamedPropertyInPrototypeChain(
inline MaybeLocal<v8::Value> GetRealNamedPropertyInPrototypeChain(
v8::Local<v8::Object> obj
, v8::Local<v8::String> key) {
return obj->GetRealNamedPropertyInPrototypeChain(GetCurrentContext(), key);
}
NAN_INLINE MaybeLocal<v8::Value> GetRealNamedProperty(
inline MaybeLocal<v8::Value> GetRealNamedProperty(
v8::Local<v8::Object> obj
, v8::Local<v8::String> key) {
return obj->GetRealNamedProperty(GetCurrentContext(), key);
}
NAN_INLINE MaybeLocal<v8::Value> CallAsFunction(
inline MaybeLocal<v8::Value> CallAsFunction(
v8::Local<v8::Object> obj
, v8::Local<v8::Object> recv
, int argc
......@@ -191,36 +191,50 @@ NAN_INLINE MaybeLocal<v8::Value> CallAsFunction(
return obj->CallAsFunction(GetCurrentContext(), recv, argc, argv);
}
NAN_INLINE MaybeLocal<v8::Value> CallAsConstructor(
inline MaybeLocal<v8::Value> CallAsConstructor(
v8::Local<v8::Object> obj
, int argc, v8::Local<v8::Value> argv[]) {
return obj->CallAsConstructor(GetCurrentContext(), argc, argv);
}
NAN_INLINE
inline
MaybeLocal<v8::String> GetSourceLine(v8::Local<v8::Message> msg) {
return msg->GetSourceLine(GetCurrentContext());
}
NAN_INLINE Maybe<int> GetLineNumber(v8::Local<v8::Message> msg) {
inline Maybe<int> GetLineNumber(v8::Local<v8::Message> msg) {
return msg->GetLineNumber(GetCurrentContext());
}
NAN_INLINE Maybe<int> GetStartColumn(v8::Local<v8::Message> msg) {
inline Maybe<int> GetStartColumn(v8::Local<v8::Message> msg) {
return msg->GetStartColumn(GetCurrentContext());
}
NAN_INLINE Maybe<int> GetEndColumn(v8::Local<v8::Message> msg) {
inline Maybe<int> GetEndColumn(v8::Local<v8::Message> msg) {
return msg->GetEndColumn(GetCurrentContext());
}
NAN_INLINE MaybeLocal<v8::Object> CloneElementAt(
inline MaybeLocal<v8::Object> CloneElementAt(
v8::Local<v8::Array> array
, uint32_t index) {
#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
v8::EscapableHandleScope handle_scope(v8::Isolate::GetCurrent());
v8::Local<v8::Context> context = GetCurrentContext();
v8::Local<v8::Value> elem;
if (!array->Get(context, index).ToLocal(&elem)) {
return MaybeLocal<v8::Object>();
}
v8::Local<v8::Object> obj;
if (!elem->ToObject(context).ToLocal(&obj)) {
return MaybeLocal<v8::Object>();
}
return MaybeLocal<v8::Object>(handle_scope.Escape(obj->Clone()));
#else
return array->CloneElementAt(GetCurrentContext(), index);
#endif
}
NAN_INLINE MaybeLocal<v8::Value> Call(
inline MaybeLocal<v8::Value> Call(
v8::Local<v8::Function> fun
, v8::Local<v8::Object> recv
, int argc
......
......@@ -12,25 +12,25 @@
template<typename T>
class MaybeLocal {
public:
NAN_INLINE MaybeLocal() : val_(v8::Local<T>()) {}
inline MaybeLocal() : val_(v8::Local<T>()) {}
template<typename S>
# if NODE_MODULE_VERSION >= NODE_0_12_MODULE_VERSION
NAN_INLINE MaybeLocal(v8::Local<S> that) : val_(that) {}
inline MaybeLocal(v8::Local<S> that) : val_(that) {}
# else
NAN_INLINE MaybeLocal(v8::Local<S> that) :
inline MaybeLocal(v8::Local<S> that) :
val_(*reinterpret_cast<v8::Local<T>*>(&that)) {}
# endif
NAN_INLINE bool IsEmpty() const { return val_.IsEmpty(); }
inline bool IsEmpty() const { return val_.IsEmpty(); }
template<typename S>
NAN_INLINE bool ToLocal(v8::Local<S> *out) const {
inline bool ToLocal(v8::Local<S> *out) const {
*out = val_;
return !IsEmpty();
}
NAN_INLINE v8::Local<T> ToLocalChecked() const {
inline v8::Local<T> ToLocalChecked() const {
#if defined(V8_ENABLE_CHECKS)
assert(!IsEmpty() && "ToLocalChecked is Empty");
#endif // V8_ENABLE_CHECKS
......@@ -38,7 +38,7 @@ class MaybeLocal {
}
template<typename S>
NAN_INLINE v8::Local<S> FromMaybe(v8::Local<S> default_value) const {
inline v8::Local<S> FromMaybe(v8::Local<S> default_value) const {
return IsEmpty() ? default_value : val_;
}
......@@ -49,26 +49,26 @@ class MaybeLocal {
template<typename T>
class Maybe {
public:
NAN_INLINE bool IsNothing() const { return !has_value_; }
NAN_INLINE bool IsJust() const { return has_value_; }
inline bool IsNothing() const { return !has_value_; }
inline bool IsJust() const { return has_value_; }
NAN_INLINE T FromJust() const {
inline T FromJust() const {
#if defined(V8_ENABLE_CHECKS)
assert(IsJust() && "FromJust is Nothing");
#endif // V8_ENABLE_CHECKS
return value_;
}
NAN_INLINE T FromMaybe(const T& default_value) const {
inline T FromMaybe(const T& default_value) const {
return has_value_ ? value_ : default_value;
}
NAN_INLINE bool operator==(const Maybe &other) const {
inline bool operator==(const Maybe &other) const {
return (IsJust() == other.IsJust()) &&
(!IsJust() || FromJust() == other.FromJust());
}
NAN_INLINE bool operator!=(const Maybe &other) const {
inline bool operator!=(const Maybe &other) const {
return !operator==(other);
}
......@@ -94,27 +94,27 @@ inline Maybe<T> Just(const T& t) {
return Maybe<T>(t);
}
NAN_INLINE
inline
MaybeLocal<v8::String> ToDetailString(v8::Handle<v8::Value> val) {
return MaybeLocal<v8::String>(val->ToDetailString());
}
NAN_INLINE
inline
MaybeLocal<v8::Uint32> ToArrayIndex(v8::Handle<v8::Value> val) {
return MaybeLocal<v8::Uint32>(val->ToArrayIndex());
}
NAN_INLINE
inline
Maybe<bool> Equals(v8::Handle<v8::Value> a, v8::Handle<v8::Value>(b)) {
return Just<bool>(a->Equals(b));
}
NAN_INLINE
inline
MaybeLocal<v8::Object> NewInstance(v8::Handle<v8::Function> h) {
return MaybeLocal<v8::Object>(h->NewInstance());
}
NAN_INLINE
inline
MaybeLocal<v8::Object> NewInstance(
v8::Local<v8::Function> h
, int argc
......@@ -122,31 +122,31 @@ MaybeLocal<v8::Object> NewInstance(
return MaybeLocal<v8::Object>(h->NewInstance(argc, argv));
}
NAN_INLINE
inline
MaybeLocal<v8::Object> NewInstance(v8::Handle<v8::ObjectTemplate> h) {
return MaybeLocal<v8::Object>(h->NewInstance());
}
NAN_INLINE
inline
MaybeLocal<v8::Function> GetFunction(v8::Handle<v8::FunctionTemplate> t) {
return MaybeLocal<v8::Function>(t->GetFunction());
}
NAN_INLINE Maybe<bool> Set(
inline Maybe<bool> Set(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Value> key
, v8::Handle<v8::Value> value) {
return Just<bool>(obj->Set(key, value));
}
NAN_INLINE Maybe<bool> Set(
inline Maybe<bool> Set(
v8::Handle<v8::Object> obj
, uint32_t index
, v8::Handle<v8::Value> value) {
return Just<bool>(obj->Set(index, value));
}
NAN_INLINE Maybe<bool> ForceSet(
inline Maybe<bool> ForceSet(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Value> key
, v8::Handle<v8::Value> value
......@@ -154,107 +154,107 @@ NAN_INLINE Maybe<bool> ForceSet(
return Just<bool>(obj->ForceSet(key, value, attribs));
}
NAN_INLINE MaybeLocal<v8::Value> Get(
inline MaybeLocal<v8::Value> Get(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Value> key) {
return MaybeLocal<v8::Value>(obj->Get(key));
}
NAN_INLINE MaybeLocal<v8::Value> Get(
inline MaybeLocal<v8::Value> Get(
v8::Handle<v8::Object> obj
, uint32_t index) {
return MaybeLocal<v8::Value>(obj->Get(index));
}
NAN_INLINE Maybe<v8::PropertyAttribute> GetPropertyAttributes(
inline Maybe<v8::PropertyAttribute> GetPropertyAttributes(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Value> key) {
return Just<v8::PropertyAttribute>(obj->GetPropertyAttributes(key));
}
NAN_INLINE Maybe<bool> Has(
inline Maybe<bool> Has(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return Just<bool>(obj->Has(key));
}
NAN_INLINE Maybe<bool> Has(
inline Maybe<bool> Has(
v8::Handle<v8::Object> obj
, uint32_t index) {
return Just<bool>(obj->Has(index));
}
NAN_INLINE Maybe<bool> Delete(
inline Maybe<bool> Delete(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return Just<bool>(obj->Delete(key));
}
NAN_INLINE Maybe<bool> Delete(
inline Maybe<bool> Delete(
v8::Handle<v8::Object> obj
, uint32_t index) {
return Just<bool>(obj->Delete(index));
}
NAN_INLINE
inline
MaybeLocal<v8::Array> GetPropertyNames(v8::Handle<v8::Object> obj) {
return MaybeLocal<v8::Array>(obj->GetPropertyNames());
}
NAN_INLINE
inline
MaybeLocal<v8::Array> GetOwnPropertyNames(v8::Handle<v8::Object> obj) {
return MaybeLocal<v8::Array>(obj->GetOwnPropertyNames());
}
NAN_INLINE Maybe<bool> SetPrototype(
inline Maybe<bool> SetPrototype(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Value> prototype) {
return Just<bool>(obj->SetPrototype(prototype));
}
NAN_INLINE MaybeLocal<v8::String> ObjectProtoToString(
inline MaybeLocal<v8::String> ObjectProtoToString(
v8::Handle<v8::Object> obj) {
return MaybeLocal<v8::String>(obj->ObjectProtoToString());
}
NAN_INLINE Maybe<bool> HasOwnProperty(
inline Maybe<bool> HasOwnProperty(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return Just<bool>(obj->HasOwnProperty(key));
}
NAN_INLINE Maybe<bool> HasRealNamedProperty(
inline Maybe<bool> HasRealNamedProperty(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return Just<bool>(obj->HasRealNamedProperty(key));
}
NAN_INLINE Maybe<bool> HasRealIndexedProperty(
inline Maybe<bool> HasRealIndexedProperty(
v8::Handle<v8::Object> obj
, uint32_t index) {
return Just<bool>(obj->HasRealIndexedProperty(index));
}
NAN_INLINE Maybe<bool> HasRealNamedCallbackProperty(
inline Maybe<bool> HasRealNamedCallbackProperty(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return Just<bool>(obj->HasRealNamedCallbackProperty(key));
}
NAN_INLINE MaybeLocal<v8::Value> GetRealNamedPropertyInPrototypeChain(
inline MaybeLocal<v8::Value> GetRealNamedPropertyInPrototypeChain(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return MaybeLocal<v8::Value>(
obj->GetRealNamedPropertyInPrototypeChain(key));
}
NAN_INLINE MaybeLocal<v8::Value> GetRealNamedProperty(
inline MaybeLocal<v8::Value> GetRealNamedProperty(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return MaybeLocal<v8::Value>(obj->GetRealNamedProperty(key));
}
NAN_INLINE MaybeLocal<v8::Value> CallAsFunction(
inline MaybeLocal<v8::Value> CallAsFunction(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Object> recv
, int argc
......@@ -262,37 +262,37 @@ NAN_INLINE MaybeLocal<v8::Value> CallAsFunction(
return MaybeLocal<v8::Value>(obj->CallAsFunction(recv, argc, argv));
}
NAN_INLINE MaybeLocal<v8::Value> CallAsConstructor(
inline MaybeLocal<v8::Value> CallAsConstructor(
v8::Handle<v8::Object> obj
, int argc
, v8::Local<v8::Value> argv[]) {
return MaybeLocal<v8::Value>(obj->CallAsConstructor(argc, argv));
}
NAN_INLINE
inline
MaybeLocal<v8::String> GetSourceLine(v8::Handle<v8::Message> msg) {
return MaybeLocal<v8::String>(msg->GetSourceLine());
}
NAN_INLINE Maybe<int> GetLineNumber(v8::Handle<v8::Message> msg) {
inline Maybe<int> GetLineNumber(v8::Handle<v8::Message> msg) {
return Just<int>(msg->GetLineNumber());
}
NAN_INLINE Maybe<int> GetStartColumn(v8::Handle<v8::Message> msg) {
inline Maybe<int> GetStartColumn(v8::Handle<v8::Message> msg) {
return Just<int>(msg->GetStartColumn());
}
NAN_INLINE Maybe<int> GetEndColumn(v8::Handle<v8::Message> msg) {
inline Maybe<int> GetEndColumn(v8::Handle<v8::Message> msg) {
return Just<int>(msg->GetEndColumn());
}
NAN_INLINE MaybeLocal<v8::Object> CloneElementAt(
inline MaybeLocal<v8::Object> CloneElementAt(
v8::Handle<v8::Array> array
, uint32_t index) {
return MaybeLocal<v8::Object>(array->CloneElementAt(index));
}
NAN_INLINE MaybeLocal<v8::Value> Call(
inline MaybeLocal<v8::Value> Call(
v8::Local<v8::Function> fun
, v8::Local<v8::Object> recv
, int argc
......
......@@ -39,8 +39,8 @@ class ObjectWrap {
}
inline v8::Local<v8::Object> handle() {
return New(persistent());
inline v8::Local<v8::Object> handle() const {
return New(handle_);
}
......
......@@ -12,38 +12,38 @@
template<typename T, typename M> class Persistent :
public v8::Persistent<T, M> {