...
 
Commits (4)
# NAN ChangeLog
**Version 2.12.1: current Node 11.4.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1**
**Version 2.13.2: current Node 11.12.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1**
### 2.13.2 Mar 24 2019
- Bugfix: remove usage of deprecated `IsNearDeath` (#842) fbaf42252af279c3d867c6b193571f9711c39847
### 2.13.1 Mar 14 2019
- Bugfix: check V8 version directly instead of inferring from NMV (#840) 12f9df9f393285de8fb4a8cd01478dc4fe3b089d
### 2.13.0 Mar 13 2019
- Feature: add support for node master (#831) 113c0282072e7ff4f9dfc98b432fd894b798c2c
### 2.12.1 Dec 18 2018
......
......@@ -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, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11.**
***Current version: 2.12.1***
***Current version: 2.13.2***
*(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)*
......
node-nan (2.13.2-1) unstable; urgency=medium
* New upstream version 2.13.2
-- Jérémy Lal <kapouer@melix.org> Thu, 25 Apr 2019 10:08:07 +0200
node-nan (2.12.1-1) unstable; urgency=medium
* New upstream version 2.12.1
......
......@@ -10,7 +10,7 @@ Build-Depends: nodejs (>= 6.11.2~dfsg-1~),
node-tap (>= 0.7.1) <!nocheck>,
node-gyp (>= 3.0.1) <!nocheck>,
node-bindings <!nocheck>
Standards-Version: 4.2.1
Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/js-team/node-nan
Vcs-Git: https://salsa.debian.org/js-team/node-nan.git
Homepage: https://github.com/nodejs/nan
......
......@@ -13,7 +13,7 @@
*
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
*
* Version 2.12.1: current Node 11.4.0, Node 12: 0.12.18, Node 10: 0.10.48, iojs: 3.3.1
* Version 2.13.2: current Node 11.12.0, Node 12: 0.12.18, Node 10: 0.10.48, iojs: 3.3.1
*
* See https://github.com/nodejs/nan for the latest update to this file
**********************************************************************************/
......
......@@ -19,13 +19,23 @@ imp::ToFactory<v8::TYPE>::convert(v8::Local<v8::Value> val) { \
.FromMaybe(v8::Local<v8::TYPE>())); \
}
X(Boolean)
X(Number)
X(String)
X(Object)
X(Integer)
X(Uint32)
X(Int32)
// V8 <= 7.0
#if V8_MAJOR_VERSION < 7 || (V8_MAJOR_VERSION == 7 && V8_MINOR_VERSION == 0)
X(Boolean)
#else
imp::ToFactory<v8::Boolean>::return_t \
imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value> val) { \
v8::Isolate *isolate = v8::Isolate::GetCurrent(); \
v8::EscapableHandleScope scope(isolate); \
return scope.Escape(val->ToBoolean(isolate)); \
}
#endif
#undef X
......@@ -37,11 +47,21 @@ imp::ToFactory<TYPE>::convert(v8::Local<v8::Value> val) { \
return val->NAME ## Value(isolate->GetCurrentContext()); \
}
X(bool, Boolean)
X(double, Number)
X(int64_t, Integer)
X(uint32_t, Uint32)
X(int32_t, Int32)
// V8 <= 7.0
#if V8_MAJOR_VERSION < 7 || (V8_MAJOR_VERSION == 7 && V8_MINOR_VERSION == 0)
X(bool, Boolean)
#else
imp::ToFactory<bool>::return_t \
imp::ToFactory<bool>::convert(v8::Local<v8::Value> val) { \
v8::Isolate *isolate = v8::Isolate::GetCurrent(); \
v8::HandleScope scope(isolate); \
return Just<bool>(val->BooleanValue(isolate)); \
}
#endif
#undef X
......
......@@ -345,6 +345,10 @@ Factory<v8::String>::New(ExternalOneByteStringResource * value) {
// TODO(bnoordhuis) Use isolate-based version in Node.js v12.
Factory<v8::StringObject>::return_t
Factory<v8::StringObject>::New(v8::Local<v8::String> value) {
// V8 > 7.0
#if V8_MAJOR_VERSION > 7 || (V8_MAJOR_VERSION == 7 && V8_MINOR_VERSION > 0)
return v8::StringObject::New(v8::Isolate::GetCurrent(), value).As<v8::StringObject>();
#else
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4996)
......@@ -360,6 +364,7 @@ Factory<v8::StringObject>::New(v8::Local<v8::String> value) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif
}
//=== Unbound Script ===========================================================
......
......@@ -21,7 +21,6 @@ class ObjectWrap {
return;
}
assert(persistent().IsNearDeath());
persistent().ClearWeak();
persistent().Reset();
}
......@@ -124,7 +123,6 @@ class ObjectWrap {
WeakCallback(v8::WeakCallbackInfo<ObjectWrap> const& info) {
ObjectWrap* wrap = info.GetParameter();
assert(wrap->refs_ == 0);
assert(wrap->handle_.IsNearDeath());
wrap->handle_.Reset();
delete wrap;
}
......
{
"name": "nan",
"version": "2.12.1",
"version": "2.13.2",
"description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 11 compatibility",
"main": "include_dirs.js",
"repository": {
......