From 89df0bd04653739a9bdc11ffda6db9a37057093f Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Thu, 6 Aug 2015 10:50:45 +0200 Subject: [PATCH] replace missing Handle<...> with Local<...> --- src/batch.cc | 14 +++++++------- src/batch.h | 6 +++--- src/common.h | 4 ++-- src/database.cc | 6 +++--- src/database.h | 4 ++-- src/iterator.cc | 6 +++--- src/leveldown.cc | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/batch.cc b/src/batch.cc index b079ed8a..23a8a3da 100644 --- a/src/batch.cc +++ b/src/batch.cc @@ -54,9 +54,9 @@ NAN_METHOD(Batch::New) { info.GetReturnValue().Set(info.This()); } -v8::Handle Batch::NewInstance ( - v8::Handle database - , v8::Handle optionsObj +v8::Local Batch::NewInstance ( + v8::Local database + , v8::Local optionsObj ) { Nan::EscapableHandleScope scope; @@ -67,10 +67,10 @@ v8::Handle Batch::NewInstance ( Nan::New(batch_constructor); if (optionsObj.IsEmpty()) { - v8::Handle argv[1] = { database }; + v8::Local argv[1] = { database }; instance = constructorHandle->GetFunction()->NewInstance(1, argv); } else { - v8::Handle argv[2] = { database, optionsObj }; + v8::Local argv[2] = { database, optionsObj }; instance = constructorHandle->GetFunction()->NewInstance(2, argv); } @@ -79,7 +79,7 @@ v8::Handle Batch::NewInstance ( NAN_METHOD(Batch::Put) { Batch* batch = ObjectWrap::Unwrap(info.Holder()); - v8::Handle callback; // purely for the error macros + v8::Local callback; // purely for the error macros v8::Local keyBuffer = info[0]; v8::Local valueBuffer = info[1]; @@ -99,7 +99,7 @@ NAN_METHOD(Batch::Put) { NAN_METHOD(Batch::Del) { Batch* batch = ObjectWrap::Unwrap(info.Holder()); - v8::Handle callback; // purely for the error macros + v8::Local callback; // purely for the error macros v8::Local keyBuffer = info[0]; LD_STRING_OR_BUFFER_TO_SLICE(key, keyBuffer, key) diff --git a/src/batch.h b/src/batch.h index f8e1a91e..39fb0685 100644 --- a/src/batch.h +++ b/src/batch.h @@ -13,9 +13,9 @@ namespace leveldown { class Batch : public Nan::ObjectWrap { public: static void Init(); - static v8::Handle NewInstance ( - v8::Handle database - , v8::Handle optionsObj + static v8::Local NewInstance ( + v8::Local database + , v8::Local optionsObj ); Batch (leveldown::Database* database, bool sync); diff --git a/src/common.h b/src/common.h index bc62d275..1eca681c 100644 --- a/src/common.h +++ b/src/common.h @@ -13,7 +13,7 @@ namespace leveldown { NAN_INLINE bool BooleanOptionValue(v8::Local options, const char* _key, bool def = false) { - v8::Handle key = Nan::New(_key).ToLocalChecked(); + v8::Local key = Nan::New(_key).ToLocalChecked(); return !options.IsEmpty() && options->Has(key) ? options->Get(key)->BooleanValue() @@ -23,7 +23,7 @@ NAN_INLINE bool BooleanOptionValue(v8::Local options, NAN_INLINE uint32_t UInt32OptionValue(v8::Local options, const char* _key, uint32_t def) { - v8::Handle key = Nan::New(_key).ToLocalChecked(); + v8::Local key = Nan::New(_key).ToLocalChecked(); return !options.IsEmpty() && options->Has(key) && options->Get(key)->IsNumber() diff --git a/src/database.cc b/src/database.cc index d9db8f56..c3ea44ba 100644 --- a/src/database.cc +++ b/src/database.cc @@ -21,7 +21,7 @@ namespace leveldown { static Nan::Persistent database_constructor; -Database::Database (const v8::Handle& from) +Database::Database (const v8::Local& from) : location(new Nan::Utf8String(from)) , db(NULL) , currentIteratorId(0) @@ -154,7 +154,7 @@ NAN_METHOD(Database::New) { info.GetReturnValue().Set(info.This()); } -v8::Handle Database::NewInstance (v8::Local &location) { +v8::Local Database::NewInstance (v8::Local &location) { Nan::EscapableHandleScope scope; v8::Local instance; @@ -162,7 +162,7 @@ v8::Handle Database::NewInstance (v8::Local &location) { v8::Local constructorHandle = Nan::New(database_constructor); - v8::Handle argv[] = { location }; + v8::Local argv[] = { location }; instance = constructorHandle->GetFunction()->NewInstance(1, argv); return scope.Escape(instance); diff --git a/src/database.h b/src/database.h index 955d3b9e..dd833ee9 100644 --- a/src/database.h +++ b/src/database.h @@ -46,7 +46,7 @@ static inline void ClearReferences (std::vector *references) { class Database : public Nan::ObjectWrap { public: static void Init (); - static v8::Handle NewInstance (v8::Local &location); + static v8::Local NewInstance (v8::Local &location); leveldb::Status OpenDatabase (leveldb::Options* options); leveldb::Status PutToDatabase ( @@ -75,7 +75,7 @@ class Database : public Nan::ObjectWrap { void CloseDatabase (); void ReleaseIterator (uint32_t id); - Database (const v8::Handle& from); + Database (const v8::Local& from); ~Database (); private: diff --git a/src/iterator.cc b/src/iterator.cc index 90f8a0d0..37c5ede8 100644 --- a/src/iterator.cc +++ b/src/iterator.cc @@ -317,10 +317,10 @@ v8::Local Iterator::NewInstance ( Nan::New(iterator_constructor); if (optionsObj.IsEmpty()) { - v8::Handle argv[2] = { database, id }; + v8::Local argv[2] = { database, id }; instance = constructorHandle->GetFunction()->NewInstance(2, argv); } else { - v8::Handle argv[3] = { database, id, optionsObj }; + v8::Local argv[3] = { database, id, optionsObj }; instance = constructorHandle->GetFunction()->NewInstance(3, argv); } @@ -331,7 +331,7 @@ NAN_METHOD(Iterator::New) { Database* database = Nan::ObjectWrap::Unwrap(info[0]->ToObject()); //TODO: remove this, it's only here to make LD_STRING_OR_BUFFER_TO_SLICE happy - v8::Handle callback; + v8::Local callback; v8::Local startHandle; leveldb::Slice* start = NULL; diff --git a/src/leveldown.cc b/src/leveldown.cc index 8b46b8e4..fc95c614 100644 --- a/src/leveldown.cc +++ b/src/leveldown.cc @@ -49,7 +49,7 @@ NAN_METHOD(RepairDB) { info.GetReturnValue().SetUndefined(); } -void Init (v8::Handle target) { +void Init (v8::Local target) { Database::Init(); leveldown::Iterator::Init(); leveldown::Batch::Init();