[Pkg-javascript-commits] [node-leveldown] 456/492: use NanNewLocal for Node 0.11.9 support
Andrew Kelley
andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:14:31 UTC 2014
This is an automated email from the git hooks/post-receive script.
andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.
commit 370fa6244886e52828a868848413ad84b4c5d2eb
Author: Rod Vagg <rod at vagg.org>
Date: Sat Nov 16 21:32:45 2013 +1100
use NanNewLocal for Node 0.11.9 support
---
src/database_async.cc | 4 ++--
src/iterator.cc | 10 +++++-----
src/iterator_async.cc | 2 +-
src/leveldown.h | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/database_async.cc b/src/database_async.cc
index 3a06928..5c7cd03 100644
--- a/src/database_async.cc
+++ b/src/database_async.cc
@@ -135,7 +135,7 @@ void ReadWorker::HandleOKCallback () {
returnValue = v8::String::New((char*)value.data(), value.size());
}
v8::Local<v8::Value> argv[] = {
- v8::Local<v8::Value>::New(v8::Null())
+ NanNewLocal<v8::Value>(v8::Null())
, returnValue
};
callback->Call(2, argv);
@@ -259,7 +259,7 @@ void ApproximateSizeWorker::HandleOKCallback () {
v8::Local<v8::Value> returnValue = v8::Number::New((double) size);
v8::Local<v8::Value> argv[] = {
- v8::Local<v8::Value>::New(v8::Null())
+ NanNewLocal<v8::Value>(v8::Null())
, returnValue
};
callback->Call(2, argv);
diff --git a/src/iterator.cc b/src/iterator.cc
index e6fde6d..6a696eb 100644
--- a/src/iterator.cc
+++ b/src/iterator.cc
@@ -327,7 +327,7 @@ NAN_METHOD(Iterator::New) {
|| optionsObj->Get(NanSymbol("end"))->IsString())) {
v8::Local<v8::Value> endBuffer =
- v8::Local<v8::Value>::New(optionsObj->Get(NanSymbol("end")));
+ NanNewLocal<v8::Value>(optionsObj->Get(NanSymbol("end")));
// ignore end if it has size 0 since a Slice can't have length 0
if (StringOrBufferLength(endBuffer) > 0) {
@@ -346,7 +346,7 @@ NAN_METHOD(Iterator::New) {
|| optionsObj->Get(NanSymbol("lt"))->IsString())) {
v8::Local<v8::Value> ltBuffer =
- v8::Local<v8::Value>::New(optionsObj->Get(NanSymbol("lt")));
+ NanNewLocal<v8::Value>(optionsObj->Get(NanSymbol("lt")));
// ignore end if it has size 0 since a Slice can't have length 0
if (StringOrBufferLength(ltBuffer) > 0) {
@@ -362,7 +362,7 @@ NAN_METHOD(Iterator::New) {
|| optionsObj->Get(NanSymbol("lte"))->IsString())) {
v8::Local<v8::Value> lteBuffer =
- v8::Local<v8::Value>::New(optionsObj->Get(NanSymbol("lte")));
+ NanNewLocal<v8::Value>(optionsObj->Get(NanSymbol("lte")));
// ignore end if it has size 0 since a Slice can't have length 0
if (StringOrBufferLength(lteBuffer) > 0) {
@@ -378,7 +378,7 @@ NAN_METHOD(Iterator::New) {
|| optionsObj->Get(NanSymbol("gt"))->IsString())) {
v8::Local<v8::Value> gtBuffer =
- v8::Local<v8::Value>::New(optionsObj->Get(NanSymbol("gt")));
+ NanNewLocal<v8::Value>(optionsObj->Get(NanSymbol("gt")));
// ignore end if it has size 0 since a Slice can't have length 0
if (StringOrBufferLength(gtBuffer) > 0) {
@@ -394,7 +394,7 @@ NAN_METHOD(Iterator::New) {
|| optionsObj->Get(NanSymbol("gte"))->IsString())) {
v8::Local<v8::Value> gteBuffer =
- v8::Local<v8::Value>::New(optionsObj->Get(NanSymbol("gte")));
+ NanNewLocal<v8::Value>(optionsObj->Get(NanSymbol("gte")));
// ignore end if it has size 0 since a Slice can't have length 0
if (StringOrBufferLength(gteBuffer) > 0) {
diff --git a/src/iterator_async.cc b/src/iterator_async.cc
index c00cbbc..efd0ccc 100644
--- a/src/iterator_async.cc
+++ b/src/iterator_async.cc
@@ -54,7 +54,7 @@ void NextWorker::HandleOKCallback () {
if (ok) {
v8::Local<v8::Value> argv[] = {
- v8::Local<v8::Value>::New(v8::Null())
+ NanNewLocal<v8::Value>(v8::Null())
, returnKey
, returnValue
};
diff --git a/src/leveldown.h b/src/leveldown.h
index 2223094..2617ade 100644
--- a/src/leveldown.h
+++ b/src/leveldown.h
@@ -69,7 +69,7 @@ static inline void DisposeStringOrBufferFromSlice(
#define LD_RETURN_CALLBACK_OR_ERROR(callback, msg) \
if (!callback.IsEmpty() && callback->IsFunction()) { \
v8::Local<v8::Value> argv[] = { \
- v8::Local<v8::Value>::New(v8::Exception::Error( \
+ NanNewLocal<v8::Value>(v8::Exception::Error( \
v8::String::New(msg)) \
) \
}; \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git
More information about the Pkg-javascript-commits
mailing list