summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichaƫl Zasso <mic.besace@gmail.com>2015-07-18 11:34:16 +0200
committerRod Vagg <rod@vagg.org>2015-09-06 21:38:05 +1000
commit4abc896a826c892c0d124989cc4ea6f490328942 (patch)
treeb201398a2fd9ea783ef5a8c9bf0ca9299f2451c4 /src
parent9a03ae63566f761539bd3a18f0b08c34c4ba0e13 (diff)
downloadandroid-node-v8-4abc896a826c892c0d124989cc4ea6f490328942.tar.gz
android-node-v8-4abc896a826c892c0d124989cc4ea6f490328942.tar.bz2
android-node-v8-4abc896a826c892c0d124989cc4ea6f490328942.zip
src: replace usage of v8::Handle with v8::Local
v8::Handle is deprecated: https://codereview.chromium.org/1224623004 PR-URL: https://github.com/nodejs/io.js/pull/2202 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src')
-rw-r--r--src/async-wrap-inl.h12
-rw-r--r--src/async-wrap.cc13
-rw-r--r--src/async-wrap.h14
-rw-r--r--src/cares_wrap.cc7
-rw-r--r--src/debug-agent.cc1
-rw-r--r--src/fs_event_wrap.cc17
-rw-r--r--src/handle_wrap.cc3
-rw-r--r--src/handle_wrap.h2
-rw-r--r--src/js_stream.cc9
-rw-r--r--src/js_stream.h8
-rw-r--r--src/node.cc91
-rw-r--r--src/node.h54
-rw-r--r--src/node_buffer.cc27
-rw-r--r--src/node_buffer.h14
-rw-r--r--src/node_constants.cc18
-rw-r--r--src/node_constants.h2
-rw-r--r--src/node_contextify.cc9
-rw-r--r--src/node_counters.cc5
-rw-r--r--src/node_counters.h4
-rw-r--r--src/node_crypto.cc37
-rw-r--r--src/node_crypto.h26
-rw-r--r--src/node_dtrace.cc3
-rw-r--r--src/node_dtrace.h2
-rw-r--r--src/node_file.cc7
-rw-r--r--src/node_file.h2
-rw-r--r--src/node_http_parser.cc7
-rw-r--r--src/node_http_parser.h2
-rw-r--r--src/node_internals.h36
-rw-r--r--src/node_javascript.cc7
-rw-r--r--src/node_javascript.h4
-rw-r--r--src/node_lttng.cc3
-rw-r--r--src/node_lttng.h2
-rw-r--r--src/node_object_wrap.h4
-rw-r--r--src/node_os.cc7
-rw-r--r--src/node_stat_watcher.cc3
-rw-r--r--src/node_stat_watcher.h2
-rw-r--r--src/node_v8.cc7
-rw-r--r--src/node_zlib.cc9
-rw-r--r--src/pipe_wrap.cc9
-rw-r--r--src/pipe_wrap.h8
-rw-r--r--src/process_wrap.cc9
-rw-r--r--src/req-wrap-inl.h2
-rw-r--r--src/req-wrap.h2
-rw-r--r--src/signal_wrap.cc9
-rw-r--r--src/spawn_sync.cc7
-rw-r--r--src/spawn_sync.h7
-rw-r--r--src/stream_base-inl.h3
-rw-r--r--src/stream_base.cc9
-rw-r--r--src/stream_base.h2
-rw-r--r--src/stream_wrap.cc9
-rw-r--r--src/stream_wrap.h8
-rw-r--r--src/string_bytes.cc11
-rw-r--r--src/string_bytes.h26
-rw-r--r--src/tcp_wrap.cc9
-rw-r--r--src/tcp_wrap.h8
-rw-r--r--src/timer_wrap.cc9
-rw-r--r--src/tls_wrap.cc7
-rw-r--r--src/tls_wrap.h6
-rw-r--r--src/tty_wrap.cc9
-rw-r--r--src/tty_wrap.h8
-rw-r--r--src/udp_wrap.cc9
-rw-r--r--src/udp_wrap.h8
-rw-r--r--src/util.cc2
-rw-r--r--src/util.h2
-rw-r--r--src/uv.cc8
65 files changed, 326 insertions, 360 deletions
diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h
index 5841c58faf..4e33153ca0 100644
--- a/src/async-wrap-inl.h
+++ b/src/async-wrap-inl.h
@@ -14,7 +14,7 @@
namespace node {
inline AsyncWrap::AsyncWrap(Environment* env,
- v8::Handle<v8::Object> object,
+ v8::Local<v8::Object> object,
ProviderType provider,
AsyncWrap* parent)
: BaseObject(env, object), bits_(static_cast<uint32_t>(provider) << 1) {
@@ -58,20 +58,20 @@ inline AsyncWrap::ProviderType AsyncWrap::provider_type() const {
}
-inline v8::Handle<v8::Value> AsyncWrap::MakeCallback(
- const v8::Handle<v8::String> symbol,
+inline v8::Local<v8::Value> AsyncWrap::MakeCallback(
+ const v8::Local<v8::String> symbol,
int argc,
- v8::Handle<v8::Value>* argv) {
+ v8::Local<v8::Value>* argv) {
v8::Local<v8::Value> cb_v = object()->Get(symbol);
CHECK(cb_v->IsFunction());
return MakeCallback(cb_v.As<v8::Function>(), argc, argv);
}
-inline v8::Handle<v8::Value> AsyncWrap::MakeCallback(
+inline v8::Local<v8::Value> AsyncWrap::MakeCallback(
uint32_t index,
int argc,
- v8::Handle<v8::Value>* argv) {
+ v8::Local<v8::Value>* argv) {
v8::Local<v8::Value> cb_v = object()->Get(index);
CHECK(cb_v->IsFunction());
return MakeCallback(cb_v.As<v8::Function>(), argc, argv);
diff --git a/src/async-wrap.cc b/src/async-wrap.cc
index 43a647b6d7..37de0588b2 100644
--- a/src/async-wrap.cc
+++ b/src/async-wrap.cc
@@ -12,7 +12,6 @@ using v8::Array;
using v8::Context;
using v8::Function;
using v8::FunctionCallbackInfo;
-using v8::Handle;
using v8::HandleScope;
using v8::HeapProfiler;
using v8::Integer;
@@ -83,7 +82,7 @@ intptr_t RetainedAsyncInfo::GetSizeInBytes() {
}
-RetainedObjectInfo* WrapperInfo(uint16_t class_id, Handle<Value> wrapper) {
+RetainedObjectInfo* WrapperInfo(uint16_t class_id, Local<Value> wrapper) {
// No class_id should be the provider type of NONE.
CHECK_NE(NODE_ASYNC_ID_OFFSET, class_id);
CHECK(wrapper->IsObject());
@@ -129,9 +128,9 @@ static void SetupHooks(const FunctionCallbackInfo<Value>& args) {
}
-static void Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+static void Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Isolate* isolate = env->isolate();
HandleScope scope(isolate);
@@ -160,9 +159,9 @@ void LoadAsyncWrapperInfo(Environment* env) {
}
-Handle<Value> AsyncWrap::MakeCallback(const Handle<Function> cb,
+Local<Value> AsyncWrap::MakeCallback(const Local<Function> cb,
int argc,
- Handle<Value>* argv) {
+ Local<Value>* argv) {
CHECK(env()->context() == env()->isolate()->GetCurrentContext());
Local<Object> context = object();
diff --git a/src/async-wrap.h b/src/async-wrap.h
index bb93872ff7..d292bb4774 100644
--- a/src/async-wrap.h
+++ b/src/async-wrap.h
@@ -47,7 +47,7 @@ class AsyncWrap : public BaseObject {
};
inline AsyncWrap(Environment* env,
- v8::Handle<v8::Object> object,
+ v8::Local<v8::Object> object,
ProviderType provider,
AsyncWrap* parent = nullptr);
@@ -56,15 +56,15 @@ class AsyncWrap : public BaseObject {
inline ProviderType provider_type() const;
// Only call these within a valid HandleScope.
- v8::Handle<v8::Value> MakeCallback(const v8::Handle<v8::Function> cb,
+ v8::Local<v8::Value> MakeCallback(const v8::Local<v8::Function> cb,
int argc,
- v8::Handle<v8::Value>* argv);
- inline v8::Handle<v8::Value> MakeCallback(const v8::Handle<v8::String> symbol,
+ v8::Local<v8::Value>* argv);
+ inline v8::Local<v8::Value> MakeCallback(const v8::Local<v8::String> symbol,
int argc,
- v8::Handle<v8::Value>* argv);
- inline v8::Handle<v8::Value> MakeCallback(uint32_t index,
+ v8::Local<v8::Value>* argv);
+ inline v8::Local<v8::Value> MakeCallback(uint32_t index,
int argc,
- v8::Handle<v8::Value>* argv);
+ v8::Local<v8::Value>* argv);
virtual size_t self_size() const = 0;
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc
index d4be7c9b9b..4ef5e01e77 100644
--- a/src/cares_wrap.cc
+++ b/src/cares_wrap.cc
@@ -38,7 +38,6 @@ using v8::EscapableHandleScope;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -1240,9 +1239,9 @@ static void CaresTimerClose(Environment* env,
}
-static void Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+static void Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
int r = ares_library_init(ARES_LIB_INIT_ALL);
diff --git a/src/debug-agent.cc b/src/debug-agent.cc
index b99446f69c..3409fb2603 100644
--- a/src/debug-agent.cc
+++ b/src/debug-agent.cc
@@ -39,7 +39,6 @@ using v8::Context;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Isolate;
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc
index e17f9ce58e..0d0096cab7 100644
--- a/src/fs_event_wrap.cc
+++ b/src/fs_event_wrap.cc
@@ -14,7 +14,6 @@ namespace node {
using v8::Context;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -24,9 +23,9 @@ using v8::Value;
class FSEventWrap: public HandleWrap {
public:
- static void Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context);
+ static void Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context);
static void New(const FunctionCallbackInfo<Value>& args);
static void Start(const FunctionCallbackInfo<Value>& args);
static void Close(const FunctionCallbackInfo<Value>& args);
@@ -34,7 +33,7 @@ class FSEventWrap: public HandleWrap {
size_t self_size() const override { return sizeof(*this); }
private:
- FSEventWrap(Environment* env, Handle<Object> object);
+ FSEventWrap(Environment* env, Local<Object> object);
virtual ~FSEventWrap() override;
static void OnEvent(uv_fs_event_t* handle, const char* filename, int events,
@@ -45,7 +44,7 @@ class FSEventWrap: public HandleWrap {
};
-FSEventWrap::FSEventWrap(Environment* env, Handle<Object> object)
+FSEventWrap::FSEventWrap(Environment* env, Local<Object> object)
: HandleWrap(env,
object,
reinterpret_cast<uv_handle_t*>(&handle_),
@@ -59,9 +58,9 @@ FSEventWrap::~FSEventWrap() {
}
-void FSEventWrap::Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void FSEventWrap::Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc
index 341ecfdef5..43c5490eef 100644
--- a/src/handle_wrap.cc
+++ b/src/handle_wrap.cc
@@ -11,7 +11,6 @@ namespace node {
using v8::Context;
using v8::FunctionCallbackInfo;
-using v8::Handle;
using v8::HandleScope;
using v8::Local;
using v8::Object;
@@ -59,7 +58,7 @@ void HandleWrap::Close(const FunctionCallbackInfo<Value>& args) {
HandleWrap::HandleWrap(Environment* env,
- Handle<Object> object,
+ Local<Object> object,
uv_handle_t* handle,
AsyncWrap::ProviderType provider,
AsyncWrap* parent)
diff --git a/src/handle_wrap.h b/src/handle_wrap.h
index 94cfe3d558..da712b33be 100644
--- a/src/handle_wrap.h
+++ b/src/handle_wrap.h
@@ -44,7 +44,7 @@ class HandleWrap : public AsyncWrap {
protected:
HandleWrap(Environment* env,
- v8::Handle<v8::Object> object,
+ v8::Local<v8::Object> object,
uv_handle_t* handle,
AsyncWrap::ProviderType provider,
AsyncWrap* parent = nullptr);
diff --git a/src/js_stream.cc b/src/js_stream.cc
index 16fabc9df3..77595ad3cd 100644
--- a/src/js_stream.cc
+++ b/src/js_stream.cc
@@ -15,14 +15,13 @@ using v8::Context;
using v8::External;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Local;
using v8::Object;
using v8::Value;
-JSStream::JSStream(Environment* env, Handle<Object> obj, AsyncWrap* parent)
+JSStream::JSStream(Environment* env, Local<Object> obj, AsyncWrap* parent)
: StreamBase(env),
AsyncWrap(env, obj, AsyncWrap::PROVIDER_JSSTREAM, parent) {
node::Wrap(obj, this);
@@ -201,9 +200,9 @@ void JSStream::EmitEOF(const FunctionCallbackInfo<Value>& args) {
}
-void JSStream::Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void JSStream::Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
diff --git a/src/js_stream.h b/src/js_stream.h
index 9f7ba7de27..1a8902af46 100644
--- a/src/js_stream.h
+++ b/src/js_stream.h
@@ -10,9 +10,9 @@ namespace node {
class JSStream : public StreamBase, public AsyncWrap {
public:
- static void Initialize(v8::Handle<v8::Object> target,
- v8::Handle<v8::Value> unused,
- v8::Handle<v8::Context> context);
+ static void Initialize(v8::Local<v8::Object> target,
+ v8::Local<v8::Value> unused,
+ v8::Local<v8::Context> context);
~JSStream();
@@ -31,7 +31,7 @@ class JSStream : public StreamBase, public AsyncWrap {
size_t self_size() const override { return sizeof(*this); }
protected:
- JSStream(Environment* env, v8::Handle<v8::Object> obj, AsyncWrap* parent);
+ JSStream(Environment* env, v8::Local<v8::Object> obj, AsyncWrap* parent);
AsyncWrap* GetAsyncWrap() override;
diff --git a/src/node.cc b/src/node.cc
index f460c8d161..f27541bc32 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -92,7 +92,6 @@ using v8::Exception;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::HeapStatistics;
using v8::Integer;
@@ -990,11 +989,11 @@ void SetupPromises(const FunctionCallbackInfo<Value>& args) {
}
-Handle<Value> MakeCallback(Environment* env,
- Handle<Value> recv,
- const Handle<Function> callback,
+Local<Value> MakeCallback(Environment* env,
+ Local<Value> recv,
+ const Local<Function> callback,
int argc,
- Handle<Value> argv[]) {
+ Local<Value> argv[]) {
// If you hit this assertion, you forgot to enter the v8::Context first.
CHECK_EQ(env->context(), env->isolate()->GetCurrentContext());
@@ -1071,43 +1070,43 @@ Handle<Value> MakeCallback(Environment* env,
// Internal only.
-Handle<Value> MakeCallback(Environment* env,
- Handle<Object> recv,
+Local<Value> MakeCallback(Environment* env,
+ Local<Object> recv,
uint32_t index,
int argc,
- Handle<Value> argv[]) {
+ Local<Value> argv[]) {
Local<Value> cb_v = recv->Get(index);
CHECK(cb_v->IsFunction());
return MakeCallback(env, recv.As<Value>(), cb_v.As<Function>(), argc, argv);
}
-Handle<Value> MakeCallback(Environment* env,
- Handle<Object> recv,
- Handle<String> symbol,
+Local<Value> MakeCallback(Environment* env,
+ Local<Object> recv,
+ Local<String> symbol,
int argc,
- Handle<Value> argv[]) {
+ Local<Value> argv[]) {
Local<Value> cb_v = recv->Get(symbol);
CHECK(cb_v->IsFunction());
return MakeCallback(env, recv.As<Value>(), cb_v.As<Function>(), argc, argv);
}
-Handle<Value> MakeCallback(Environment* env,
- Handle<Object> recv,
+Local<Value> MakeCallback(Environment* env,
+ Local<Object> recv,
const char* method,
int argc,
- Handle<Value> argv[]) {
+ Local<Value> argv[]) {
Local<String> method_string = OneByteString(env->isolate(), method);
return MakeCallback(env, recv, method_string, argc, argv);
}
-Handle<Value> MakeCallback(Isolate* isolate,
- Handle<Object> recv,
+Local<Value> MakeCallback(Isolate* isolate,
+ Local<Object> recv,
const char* method,
int argc,
- Handle<Value> argv[]) {
+ Local<Value> argv[]) {
EscapableHandleScope handle_scope(isolate);
Local<Context> context = recv->CreationContext();
Environment* env = Environment::GetCurrent(context);
@@ -1117,11 +1116,11 @@ Handle<Value> MakeCallback(Isolate* isolate,
}
-Handle<Value> MakeCallback(Isolate* isolate,
- Handle<Object> recv,
- Handle<String> symbol,
+Local<Value> MakeCallback(Isolate* isolate,
+ Local<Object> recv,
+ Local<String> symbol,
int argc,
- Handle<Value> argv[]) {
+ Local<Value> argv[]) {
EscapableHandleScope handle_scope(isolate);
Local<Context> context = recv->CreationContext();
Environment* env = Environment::GetCurrent(context);
@@ -1131,11 +1130,11 @@ Handle<Value> MakeCallback(Isolate* isolate,
}
-Handle<Value> MakeCallback(Isolate* isolate,
- Handle<Object> recv,
- Handle<Function> callback,
+Local<Value> MakeCallback(Isolate* isolate,
+ Local<Object> recv,
+ Local<Function> callback,
int argc,
- Handle<Value> argv[]) {
+ Local<Value> argv[]) {
EscapableHandleScope handle_scope(isolate);
Local<Context> context = recv->CreationContext();
Environment* env = Environment::GetCurrent(context);
@@ -1225,7 +1224,7 @@ enum encoding ParseEncoding(const char* encoding,
enum encoding ParseEncoding(Isolate* isolate,
- Handle<Value> encoding_v,
+ Local<Value> encoding_v,
enum encoding default_encoding) {
if (!encoding_v->IsString())
return default_encoding;
@@ -1249,7 +1248,7 @@ Local<Value> Encode(Isolate* isolate, const uint16_t* buf, size_t len) {
// Returns -1 if the handle was not valid for decoding
ssize_t DecodeBytes(Isolate* isolate,
- Handle<Value> val,
+ Local<Value> val,
enum encoding encoding) {
HandleScope scope(isolate);
@@ -1267,14 +1266,14 @@ ssize_t DecodeBytes(Isolate* isolate,
ssize_t DecodeWrite(Isolate* isolate,
char* buf,
size_t buflen,
- Handle<Value> val,
+ Local<Value> val,
enum encoding encoding) {
return StringBytes::Write(isolate, buf, buflen, val, encoding, nullptr);
}
void AppendExceptionLine(Environment* env,
- Handle<Value> er,
- Handle<Message> message) {
+ Local<Value> er,
+ Local<Message> message) {
if (message.IsEmpty())
return;
@@ -1373,8 +1372,8 @@ void AppendExceptionLine(Environment* env,
static void ReportException(Environment* env,
- Handle<Value> er,
- Handle<Message> message) {
+ Local<Value> er,
+ Local<Message> message) {
HandleScope scope(env->isolate());
AppendExceptionLine(env, er, message);
@@ -1449,8 +1448,8 @@ static void ReportException(Environment* env, const TryCatch& try_catch) {
// Executes a str within the current v8 context.
static Local<Value> ExecuteString(Environment* env,
- Handle<String> source,
- Handle<String> filename) {
+ Local<String> source,
+ Local<String> filename) {
EscapableHandleScope scope(env->isolate());
TryCatch try_catch;
@@ -1673,7 +1672,7 @@ static const char* name_by_gid(gid_t gid) {
#endif
-static uid_t uid_by_name(Isolate* isolate, Handle<Value> value) {
+static uid_t uid_by_name(Isolate* isolate, Local<Value> value) {
if (value->IsUint32()) {
return static_cast<uid_t>(value->Uint32Value());
} else {
@@ -1683,7 +1682,7 @@ static uid_t uid_by_name(Isolate* isolate, Handle<Value> value) {
}
-static gid_t gid_by_name(Isolate* isolate, Handle<Value> value) {
+static gid_t gid_by_name(Isolate* isolate, Local<Value> value) {
if (value->IsUint32()) {
return static_cast<gid_t>(value->Uint32Value());
} else {
@@ -2040,7 +2039,7 @@ struct node_module* get_linked_module(const char* name) {
return mp;
}
-typedef void (UV_DYNAMIC* extInit)(Handle<Object> exports);
+typedef void (UV_DYNAMIC* extInit)(Local<Object> exports);
// DLOpen is process.dlopen(module, filename).
// Used to load 'module.node' dynamically shared objects.
@@ -2142,8 +2141,8 @@ NO_RETURN void FatalError(const char* location, const char* message) {
void FatalException(Isolate* isolate,
- Handle<Value> error,
- Handle<Message> message) {
+ Local<Value> error,
+ Local<Message> message) {
HandleScope scope(isolate);
Environment* env = Environment::GetCurrent(isolate);
@@ -2189,7 +2188,7 @@ void FatalException(Isolate* isolate, const TryCatch& try_catch) {
}
-void OnMessage(Handle<Message> message, Handle<Value> error) {
+void OnMessage(Local<Message> message, Local<Value> error) {
// The current version of V8 sends messages for errors only
// (thus `error` is always set).
FatalException(Isolate::GetCurrent(), error, message);
@@ -2458,7 +2457,7 @@ static void EnvEnumerator(const PropertyCallbackInfo<Array>& info) {
}
-static Handle<Object> GetFeatures(Environment* env) {
+static Local<Object> GetFeatures(Environment* env) {
EscapableHandleScope scope(env->isolate());
Local<Object> obj = Object::New(env->isolate());
@@ -3742,7 +3741,7 @@ int EmitExit(Environment* env) {
Local<Object> process_object = env->process_object();
process_object->Set(env->exiting_string(), True(env->isolate()));
- Handle<String> exitCode = env->exit_code_string();
+ Local<String> exitCode = env->exit_code_string();
int code = process_object->Get(exitCode)->Int32Value();
Local<Value> args[] = {
@@ -3759,7 +3758,7 @@ int EmitExit(Environment* env) {
// Just a convenience method
Environment* CreateEnvironment(Isolate* isolate,
- Handle<Context> context,
+ Local<Context> context,
int argc,
const char* const* argv,
int exec_argc,
@@ -3781,7 +3780,7 @@ Environment* CreateEnvironment(Isolate* isolate,
}
static Environment* CreateEnvironment(Isolate* isolate,
- Handle<Context> context,
+ Local<Context> context,
NodeInstanceData* instance_data) {
return CreateEnvironment(isolate,
instance_data->event_loop(),
@@ -3809,7 +3808,7 @@ static void HandleCleanup(Environment* env,
Environment* CreateEnvironment(Isolate* isolate,
uv_loop_t* loop,
- Handle<Context> context,
+ Local<Context> context,
int argc,
const char* const* argv,
int exec_argc,
diff --git a/src/node.h b/src/node.h
index 4d85514366..b5941ff06b 100644
--- a/src/node.h
+++ b/src/node.h
@@ -131,24 +131,24 @@ inline v8::Local<v8::Value> UVException(int errorno,
* cb, you will appear to leak 4-bytes for every invocation. Take heed.
*/
-NODE_EXTERN v8::Handle<v8::Value> MakeCallback(
+NODE_EXTERN v8::Local<v8::Value> MakeCallback(
v8::Isolate* isolate,
- v8::Handle<v8::Object> recv,
+ v8::Local<v8::Object> recv,
const char* method,
int argc,
- v8::Handle<v8::Value>* argv);
-NODE_EXTERN v8::Handle<v8::Value> MakeCallback(
+ v8::Local<v8::Value>* argv);
+NODE_EXTERN v8::Local<v8::Value> MakeCallback(
v8::Isolate* isolate,
- v8::Handle<v8::Object> recv,
- v8::Handle<v8::String> symbol,
+ v8::Local<v8::Object> recv,
+ v8::Local<v8::String> symbol,
int argc,
- v8::Handle<v8::Value>* argv);
-NODE_EXTERN v8::Handle<v8::Value> MakeCallback(
+ v8::Local<v8::Value>* argv);
+NODE_EXTERN v8::Local<v8::Value> MakeCallback(
v8::Isolate* isolate,
- v8::Handle<v8::Object> recv,
- v8::Handle<v8::Function> callback,
+ v8::Local<v8::Object> recv,
+ v8::Local<v8::Function> callback,
int argc,
- v8::Handle<v8::Value>* argv);
+ v8::Local<v8::Value>* argv);
} // namespace node
@@ -190,7 +190,7 @@ class Environment;
NODE_EXTERN Environment* CreateEnvironment(v8::Isolate* isolate,
struct uv_loop_s* loop,
- v8::Handle<v8::Context> context,
+ v8::Local<v8::Context> context,
int argc,
const char* const* argv,
int exec_argc,
@@ -201,7 +201,7 @@ NODE_EXTERN void LoadEnvironment(Environment* env);
// CreateEnvironment() + LoadEnvironment() from above.
// `uv_default_loop()` will be passed as `loop`.
NODE_EXTERN Environment* CreateEnvironment(v8::Isolate* isolate,
- v8::Handle<v8::Context> context,
+ v8::Local<v8::Context> context,
int argc,
const char* const* argv,
int exec_argc,
@@ -249,14 +249,14 @@ inline void NODE_SET_METHOD(const TypeName& recv,
// Used to be a macro, hence the uppercase name.
// Not a template because it only makes sense for FunctionTemplates.
-inline void NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate> recv,
+inline void NODE_SET_PROTOTYPE_METHOD(v8::Local<v8::FunctionTemplate> recv,
const char* name,
v8::FunctionCallback callback) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope handle_scope(isolate);
- v8::Handle<v8::Signature> s = v8::Signature::New(isolate, recv);
+ v8::Local<v8::Signature> s = v8::Signature::New(isolate, recv);
v8::Local<v8::FunctionTemplate> t =
- v8::FunctionTemplate::New(isolate, callback, v8::Handle<v8::Value>(), s);
+ v8::FunctionTemplate::New(isolate, callback, v8::Local<v8::Value>(), s);
v8::Local<v8::Function> fn = t->GetFunction();
recv->PrototypeTemplate()->Set(v8::String::NewFromUtf8(isolate, name), fn);
v8::Local<v8::String> fn_name = v8::String::NewFromUtf8(isolate, name);
@@ -267,11 +267,11 @@ inline void NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate> recv,
enum encoding {ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER};
NODE_EXTERN enum encoding ParseEncoding(
v8::Isolate* isolate,
- v8::Handle<v8::Value> encoding_v,
+ v8::Local<v8::Value> encoding_v,
enum encoding default_encoding = BINARY);
NODE_DEPRECATED("Use ParseEncoding(isolate, ...)",
inline enum encoding ParseEncoding(
- v8::Handle<v8::Value> encoding_v,
+ v8::Local<v8::Value> encoding_v,
enum encoding default_encoding = BINARY) {
return ParseEncoding(v8::Isolate::GetCurrent(), encoding_v, default_encoding);
})
@@ -312,11 +312,11 @@ NODE_DEPRECATED("Use Encode(isolate, ...)",
// Returns -1 if the handle was not valid for decoding
NODE_EXTERN ssize_t DecodeBytes(v8::Isolate* isolate,
- v8::Handle<v8::Value>,
+ v8::Local<v8::Value>,
enum encoding encoding = BINARY);
NODE_DEPRECATED("Use DecodeBytes(isolate, ...)",
inline ssize_t DecodeBytes(
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
enum encoding encoding = BINARY) {
return DecodeBytes(v8::Isolate::GetCurrent(), val, encoding);
})
@@ -325,12 +325,12 @@ NODE_DEPRECATED("Use DecodeBytes(isolate, ...)",
NODE_EXTERN ssize_t DecodeWrite(v8::Isolate* isolate,
char* buf,
size_t buflen,
- v8::Handle<v8::Value>,
+ v8::Local<v8::Value>,
enum encoding encoding = BINARY);
NODE_DEPRECATED("Use DecodeWrite(isolate, ...)",
inline ssize_t DecodeWrite(char* buf,
size_t buflen,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
enum encoding encoding = BINARY) {
return DecodeWrite(v8::Isolate::GetCurrent(), buf, buflen, val, encoding);
})
@@ -359,14 +359,14 @@ const char *signo_string(int errorno);
typedef void (*addon_register_func)(
- v8::Handle<v8::Object> exports,
- v8::Handle<v8::Value> module,
+ v8::Local<v8::Object> exports,
+ v8::Local<v8::Value> module,
void* priv);
typedef void (*addon_context_register_func)(
- v8::Handle<v8::Object> exports,
- v8::Handle<v8::Value> module,
- v8::Handle<v8::Context> context,
+ v8::Local<v8::Object> exports,
+ v8::Local<v8::Value> module,
+ v8::Local<v8::Context> context,
void* priv);
#define NM_F_BUILTIN 0x01
diff --git a/src/node_buffer.cc b/src/node_buffer.cc
index 3eceae5946..878c6c5e00 100644
--- a/src/node_buffer.cc
+++ b/src/node_buffer.cc
@@ -57,7 +57,6 @@ using v8::EscapableHandleScope;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Isolate;
@@ -78,7 +77,7 @@ class CallbackInfo {
public:
static inline void Free(char* data, void* hint);
static inline CallbackInfo* New(Isolate* isolate,
- Handle<Object> object,
+ Local<Object> object,
FreeCallback callback,
void* hint = 0);
inline void Dispose(Isolate* isolate);
@@ -87,7 +86,7 @@ class CallbackInfo {
static void WeakCallback(const WeakCallbackData<Object, CallbackInfo>&);
inline void WeakCallback(Isolate* isolate, Local<Object> object);
inline CallbackInfo(Isolate* isolate,
- Handle<Object> object,
+ Local<Object> object,
FreeCallback callback,
void* hint);
~CallbackInfo();
@@ -104,7 +103,7 @@ void CallbackInfo::Free(char* data, void*) {
CallbackInfo* CallbackInfo::New(Isolate* isolate,
- Handle<Object> object,
+ Local<Object> object,
FreeCallback callback,
void* hint) {
return new CallbackInfo(isolate, object, callback, hint);
@@ -122,7 +121,7 @@ Persistent<Object>* CallbackInfo::persistent() {
CallbackInfo::CallbackInfo(Isolate* isolate,
- Handle<Object> object,
+ Local<Object> object,
FreeCallback callback,
void* hint)
: persistent_(isolate, object),
@@ -162,12 +161,12 @@ void CallbackInfo::WeakCallback(Isolate* isolate, Local<Object> object) {
// Buffer methods
-bool HasInstance(Handle<Value> val) {
+bool HasInstance(Local<Value> val) {
return val->IsObject() && HasInstance(val.As<Object>());
}
-bool HasInstance(Handle<Object> obj) {
+bool HasInstance(Local<Object> obj) {
if (!obj->IsUint8Array())
return false;
Local<Uint8Array> array = obj.As<Uint8Array>();
@@ -176,7 +175,7 @@ bool HasInstance(Handle<Object> obj) {
}
-char* Data(Handle<Value> val) {
+char* Data(Local<Value> val) {
CHECK(val->IsObject());
// Use a fully qualified name here to work around a bug in gcc 4.2.
// It mistakes an unadorned call to Data() for the v8::String::Data type.
@@ -184,7 +183,7 @@ char* Data(Handle<Value> val) {
}
-char* Data(Handle<Object> obj) {
+char* Data(Local<Object> obj) {
CHECK(obj->IsUint8Array());
Local<Uint8Array> ui = obj.As<Uint8Array>();
ArrayBuffer::Contents ab_c = ui->Buffer()->GetContents();
@@ -192,13 +191,13 @@ char* Data(Handle<Object> obj) {
}
-size_t Length(Handle<Value> val) {
+size_t Length(Local<Value> val) {
CHECK(val->IsObject());
return Length(val.As<Object>());
}
-size_t Length(Handle<Object> obj) {
+size_t Length(Local<Object> obj) {
CHECK(obj->IsUint8Array());
Local<Uint8Array> ui = obj.As<Uint8Array>();
return ui->ByteLength();
@@ -993,9 +992,9 @@ void SetupBufferJS(const FunctionCallbackInfo<Value>& args) {
}
-void Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
env->SetMethod(target, "setupBufferJS", SetupBufferJS);
diff --git a/src/node_buffer.h b/src/node_buffer.h
index 49fb574164..503cbb1675 100644
--- a/src/node_buffer.h
+++ b/src/node_buffer.h
@@ -12,12 +12,12 @@ static const unsigned int kMaxLength =
NODE_EXTERN typedef void (*FreeCallback)(char* data, void* hint);
-NODE_EXTERN bool HasInstance(v8::Handle<v8::Value> val);
-NODE_EXTERN bool HasInstance(v8::Handle<v8::Object> val);
-NODE_EXTERN char* Data(v8::Handle<v8::Value> val);
-NODE_EXTERN char* Data(v8::Handle<v8::Object> val);
-NODE_EXTERN size_t Length(v8::Handle<v8::Value> val);
-NODE_EXTERN size_t Length(v8::Handle<v8::Object> val);
+NODE_EXTERN bool HasInstance(v8::Local<v8::Value> val);
+NODE_EXTERN bool HasInstance(v8::Local<v8::Object> val);
+NODE_EXTERN char* Data(v8::Local<v8::Value> val);
+NODE_EXTERN char* Data(v8::Local<v8::Object> val);
+NODE_EXTERN size_t Length(v8::Local<v8::Value> val);
+NODE_EXTERN size_t Length(v8::Local<v8::Object> val);
// public constructor - data is copied
NODE_EXTERN v8::MaybeLocal<v8::Object> Copy(v8::Isolate* isolate,
@@ -29,7 +29,7 @@ NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
// public constructor from string
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
- v8::Handle<v8::String> string,
+ v8::Local<v8::String> string,
enum encoding enc = UTF8);
// public constructor - data is used, callback is passed data on object gc
diff --git a/src/node_constants.cc b/src/node_constants.cc
index 59dd11113e..51c2ee814a 100644
--- a/src/node_constants.cc
+++ b/src/node_constants.cc
@@ -21,14 +21,14 @@
namespace node {
-using v8::Handle;
+using v8::Local;
using v8::Object;
#if HAVE_OPENSSL
const char* default_cipher_list = DEFAULT_CIPHER_LIST_CORE;
#endif
-void DefineErrnoConstants(Handle<Object> target) {
+void DefineErrnoConstants(Local<Object> target) {
#ifdef E2BIG
NODE_DEFINE_CONSTANT(target, E2BIG);
#endif
@@ -346,7 +346,7 @@ void DefineErrnoConstants(Handle<Object> target) {
#endif
}
-void DefineWindowsErrorConstants(Handle<Object> target) {
+void DefineWindowsErrorConstants(Local<Object> target) {
#ifdef WSAEINTR
NODE_DEFINE_CONSTANT(target, WSAEINTR);
#endif
@@ -580,7 +580,7 @@ void DefineWindowsErrorConstants(Handle<Object> target) {
#endif
}
-void DefineSignalConstants(Handle<Object> target) {
+void DefineSignalConstants(Local<Object> target) {
#ifdef SIGHUP
NODE_DEFINE_CONSTANT(target, SIGHUP);
#endif
@@ -725,7 +725,7 @@ void DefineSignalConstants(Handle<Object> target) {
#endif
}
-void DefineOpenSSLConstants(Handle<Object> target) {
+void DefineOpenSSLConstants(Local<Object> target) {
#ifdef SSL_OP_ALL
NODE_DEFINE_CONSTANT(target, SSL_OP_ALL);
#endif
@@ -969,7 +969,7 @@ void DefineOpenSSLConstants(Handle<Object> target) {
#endif
}
-void DefineSystemConstants(Handle<Object> target) {
+void DefineSystemConstants(Local<Object> target) {
// file access modes
NODE_DEFINE_CONSTANT(target, O_RDONLY);
NODE_DEFINE_CONSTANT(target, O_WRONLY);
@@ -1108,11 +1108,11 @@ void DefineSystemConstants(Handle<Object> target) {
#endif
}
-void DefineUVConstants(Handle<Object> target) {
+void DefineUVConstants(Local<Object> target) {
NODE_DEFINE_CONSTANT(target, UV_UDP_REUSEADDR);
}
-void DefineCryptoConstants(Handle<Object> target) {
+void DefineCryptoConstants(Local<Object> target) {
#if HAVE_OPENSSL
NODE_DEFINE_STRING_CONSTANT(target,
"defaultCoreCipherList",
@@ -1123,7 +1123,7 @@ void DefineCryptoConstants(Handle<Object> target) {
#endif
}
-void DefineConstants(Handle<Object> target) {
+void DefineConstants(Local<Object> target) {
DefineErrnoConstants(target);
DefineWindowsErrorConstants(target);
DefineSignalConstants(target);
diff --git a/src/node_constants.h b/src/node_constants.h
index 45c991022e..a7c75c4eb2 100644
--- a/src/node_constants.h
+++ b/src/node_constants.h
@@ -34,7 +34,7 @@ namespace node {
extern const char* default_cipher_list;
#endif
-void DefineConstants(v8::Handle<v8::Object> target);
+void DefineConstants(v8::Local<v8::Object> target);
} // namespace node
#endif // SRC_NODE_CONSTANTS_H_
diff --git a/src/node_contextify.cc b/src/node_contextify.cc
index 16fc91836c..6520355239 100644
--- a/src/node_contextify.cc
+++ b/src/node_contextify.cc
@@ -21,7 +21,6 @@ using v8::External;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Isolate;
@@ -189,7 +188,7 @@ class ContextifyContext {
Local<Object> wrapper =
env->script_data_constructor_function()->NewInstance();
if (wrapper.IsEmpty())
- return scope.Escape(Local<Value>::New(env->isolate(), Handle<Value>()));
+ return scope.Escape(Local<Value>::New(env->isolate(), Local<Value>()));
Wrap(wrapper, this);
return scope.Escape(wrapper);
@@ -732,9 +731,9 @@ class ContextifyScript : public BaseObject {
};
-void InitContextify(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void InitContextify(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
ContextifyContext::Init(env, target);
ContextifyScript::Init(env, target);
diff --git a/src/node_counters.cc b/src/node_counters.cc
index 4e2cc0a5c2..ca05e25319 100644
--- a/src/node_counters.cc
+++ b/src/node_counters.cc
@@ -14,7 +14,6 @@ using v8::GCCallbackFlags;
using v8::GCEpilogueCallback;
using v8::GCPrologueCallback;
using v8::GCType;
-using v8::Handle;
using v8::HandleScope;
using v8::Isolate;
using v8::Local;
@@ -82,7 +81,7 @@ static void counter_gc_done(Isolate* isolate,
}
-void InitPerfCounters(Environment* env, Handle<Object> target) {
+void InitPerfCounters(Environment* env, Local<Object> target) {
HandleScope scope(env->isolate());
static struct {
@@ -118,7 +117,7 @@ void InitPerfCounters(Environment* env, Handle<Object> target) {
}
-void TermPerfCounters(Handle<Object> target) {
+void TermPerfCounters(Local<Object> target) {
// Only Windows performance counters supported
// To enable other OS, use conditional compilation here
TermPerfCountersWin32();
diff --git a/src/node_counters.h b/src/node_counters.h
index 78dd949199..8c93b34f1f 100644
--- a/src/node_counters.h
+++ b/src/node_counters.h
@@ -26,8 +26,8 @@
namespace node {
-void InitPerfCounters(Environment* env, v8::Handle<v8::Object> target);
-void TermPerfCounters(v8::Handle<v8::Object> target);
+void InitPerfCounters(Environment* env, v8::Local<v8::Object> target);
+void TermPerfCounters(v8::Local<v8::Object> target);
} // namespace node
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index eab0e0ef92..bf1f369d2b 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -72,7 +72,6 @@ using v8::External;
using v8::False;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Isolate;
@@ -135,7 +134,7 @@ X509_STORE* root_cert_store;
// Just to generate static methods
template class SSLWrap<TLSWrap>;
template void SSLWrap<TLSWrap>::AddMethods(Environment* env,
- Handle<FunctionTemplate> t);
+ Local<FunctionTemplate> t);
template void SSLWrap<TLSWrap>::InitNPN(SecureContext* sc);
template SSL_SESSION* SSLWrap<TLSWrap>::GetSessionCallback(
SSL* s,
@@ -276,7 +275,7 @@ bool EntropySource(unsigned char* buffer, size_t length) {
}
-void SecureContext::Initialize(Environment* env, Handle<Object> target) {
+void SecureContext::Initialize(Environment* env, Local<Object> target) {
Local<FunctionTemplate> t = env->NewFunctionTemplate(SecureContext::New);
t->InstanceTemplate()->SetInternalFieldCount(1);
t->SetClassName(FIXED_ONE_BYTE_STRING(env->isolate(), "SecureContext"));
@@ -415,7 +414,7 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
// Takes a string or buffer and loads it into a BIO.
// Caller responsible for BIO_free_all-ing the returned object.
-static BIO* LoadBIO(Environment* env, Handle<Value> v) {
+static BIO* LoadBIO(Environment* env, Local<Value> v) {
BIO* bio = NodeBIO::New();
if (!bio)
return nullptr;
@@ -444,7 +443,7 @@ static BIO* LoadBIO(Environment* env, Handle<Value> v) {
// Takes a string or buffer and loads it into an X509
// Caller responsible for X509_free-ing the returned object.
-static X509* LoadX509(Environment* env, Handle<Value> v) {
+static X509* LoadX509(Environment* env, Local<Value> v) {
HandleScope scope(env->isolate());
BIO *bio = LoadBIO(env, v);
@@ -1122,7 +1121,7 @@ void SecureContext::GetCertificate(const FunctionCallbackInfo<Value>& args) {
template <class Base>
-void SSLWrap<Base>::AddMethods(Environment* env, Handle<FunctionTemplate> t) {
+void SSLWrap<Base>::AddMethods(Environment* env, Local<FunctionTemplate> t) {
HandleScope scope(env->isolate());
env->SetProtoMethod(t, "getPeerCertificate", GetPeerCertificate);
@@ -1914,7 +1913,7 @@ int SSLWrap<Base>::SelectNextProtoCallback(SSL* s,
size_t len = Buffer::Length(obj);
int status = SSL_select_next_proto(out, outlen, in, inlen, npn_protos, len);
- Handle<Value> result;
+ Local<Value> result;
switch (status) {
case OPENSSL_NPN_UNSUPPORTED:
result = Null(env->isolate());
@@ -2326,7 +2325,7 @@ void Connection::NewSessionDoneCb() {
}
-void Connection::Initialize(Environment* env, Handle<Object> target) {
+void Connection::Initialize(Environment* env, Local<Object> target) {
Local<FunctionTemplate> t = env->NewFunctionTemplate(Connection::New);
t->InstanceTemplate()->SetInternalFieldCount(1);
t->SetClassName(FIXED_ONE_BYTE_STRING(env->isolate(), "Connection"));
@@ -2841,7 +2840,7 @@ void Connection::SetSNICallback(const FunctionCallbackInfo<Value>& args) {
#endif
-void CipherBase::Initialize(Environment* env, Handle<Object> target) {
+void CipherBase::Initialize(Environment* env, Local<Object> target) {
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
t->InstanceTemplate()->SetInternalFieldCount(1);
@@ -3212,7 +3211,7 @@ void CipherBase::Final(const FunctionCallbackInfo<Value>& args) {
}
-void Hmac::Initialize(Environment* env, v8::Handle<v8::Object> target) {
+void Hmac::Initialize(Environment* env, v8::Local<v8::Object> target) {
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
t->InstanceTemplate()->SetInternalFieldCount(1);
@@ -3341,7 +3340,7 @@ void Hmac::HmacDigest(const FunctionCallbackInfo<Value>& args) {
}
-void Hash::Initialize(Environment* env, v8::Handle<v8::Object> target) {
+void Hash::Initialize(Environment* env, v8::Local<v8::Object> target) {
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
t->InstanceTemplate()->SetInternalFieldCount(1);
@@ -3486,7 +3485,7 @@ void SignBase::CheckThrow(SignBase::Error error) {
-void Sign::Initialize(Environment* env, v8::Handle<v8::Object> target) {
+void Sign::Initialize(Environment* env, v8::Local<v8::Object> target) {
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
t->InstanceTemplate()->SetInternalFieldCount(1);
@@ -3662,7 +3661,7 @@ void Sign::SignFinal(const FunctionCallbackInfo<Value>& args) {
}
-void Verify::Initialize(Environment* env, v8::Handle<v8::Object> target) {
+void Verify::Initialize(Environment* env, v8::Local<v8::Object> target) {
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
t->InstanceTemplate()->SetInternalFieldCount(1);
@@ -4006,7 +4005,7 @@ void PublicKeyCipher::Cipher(const FunctionCallbackInfo<Value>& args) {
}
-void DiffieHellman::Initialize(Environment* env, Handle<Object> target) {
+void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
const PropertyAttribute attributes =
@@ -4392,7 +4391,7 @@ bool DiffieHellman::VerifyContext() {
}
-void ECDH::Initialize(Environment* env, Handle<Object> target) {
+void ECDH::Initialize(Environment* env, Local<Object> target) {
HandleScope scope(env->isolate());
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
@@ -5133,7 +5132,7 @@ void GetCurves(const FunctionCallbackInfo<Value>& args) {
}
-void Certificate::Initialize(Environment* env, Handle<Object> target) {
+void Certificate::Initialize(Environment* env, Local<Object> target) {
HandleScope scope(env->isolate());
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
@@ -5399,9 +5398,9 @@ void SetEngine(const FunctionCallbackInfo<Value>& args) {
// FIXME(bnoordhuis) Handle global init correctly.
-void InitCrypto(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context,
+void InitCrypto(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context,
void* priv) {
static uv_once_t init_once = UV_ONCE_INIT;
uv_once(&init_once, InitCryptoOnce);
diff --git a/src/node_crypto.h b/src/node_crypto.h
index edacaa1b00..3bec02c38e 100644
--- a/src/node_crypto.h
+++ b/src/node_crypto.h
@@ -59,7 +59,7 @@ class SecureContext : public BaseObject {
FreeCTXMem();
}
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
X509_STORE* ca_store_;
SSL_CTX* ctx_;
@@ -209,7 +209,7 @@ class SSLWrap {
sizeof(SSL) + sizeof(SSL3_STATE) + 42 * 1024;
static void InitNPN(SecureContext* sc);
- static void AddMethods(Environment* env, v8::Handle<v8::FunctionTemplate> t);
+ static void AddMethods(Environment* env, v8::Local<v8::FunctionTemplate> t);
static SSL_SESSION* GetSessionCallback(SSL* s,
unsigned char* key,
@@ -311,7 +311,7 @@ class Connection : public SSLWrap<Connection>, public AsyncWrap {
#endif
}
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
void NewSessionDoneCb();
#ifdef OPENSSL_NPN_NEGOTIATED
@@ -401,7 +401,7 @@ class CipherBase : public BaseObject {
EVP_CIPHER_CTX_cleanup(&ctx_);
}
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
protected:
enum CipherKind {
@@ -464,7 +464,7 @@ class Hmac : public BaseObject {
HMAC_CTX_cleanup(&ctx_);
}
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
protected:
void HmacInit(const char* hash_type, const char* key, int key_len);
@@ -497,7 +497,7 @@ class Hash : public BaseObject {
EVP_MD_CTX_cleanup(&mdctx_);
}
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
bool HashInit(const char* hash_type);
bool HashUpdate(const char* data, int len);
@@ -555,7 +555,7 @@ class SignBase : public BaseObject {
class Sign : public SignBase {
public:
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
Error SignInit(const char* sign_type);
Error SignUpdate(const char* data, int len);
@@ -578,7 +578,7 @@ class Sign : public SignBase {
class Verify : public SignBase {
public:
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
Error VerifyInit(const char* verify_type);
Error VerifyUpdate(const char* data, int len);
@@ -637,7 +637,7 @@ class DiffieHellman : public BaseObject {
}
}
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
bool Init(int primeLength, int g);
bool Init(const char* p, int p_len, int g);
@@ -684,7 +684,7 @@ class ECDH : public BaseObject {
group_ = nullptr;
}
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
protected:
ECDH(Environment* env, v8::Local<v8::Object> wrap, EC_KEY* key)
@@ -713,9 +713,9 @@ class ECDH : public BaseObject {
class Certificate : public AsyncWrap {
public:
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
- v8::Handle<v8::Value> CertificateInit(const char* sign_type);
+ v8::Local<v8::Value> CertificateInit(const char* sign_type);
bool VerifySpkac(const char* data, unsigned int len);
const char* ExportPublicKey(const char* data, int len);
const char* ExportChallenge(const char* data, int len);
@@ -738,7 +738,7 @@ bool EntropySource(unsigned char* buffer, size_t length);
#ifndef OPENSSL_NO_ENGINE
void SetEngine(const v8::FunctionCallbackInfo<v8::Value>& args);
#endif // !OPENSSL_NO_ENGINE
-void InitCrypto(v8::Handle<v8::Object> target);
+void InitCrypto(v8::Local<v8::Object> target);
} // namespace crypto
} // namespace node
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc
index d82e0f7dcb..568972bab3 100644
--- a/src/node_dtrace.cc
+++ b/src/node_dtrace.cc
@@ -37,7 +37,6 @@ using v8::GCCallbackFlags;
using v8::GCEpilogueCallback;
using v8::GCPrologueCallback;
using v8::GCType;
-using v8::Handle;
using v8::HandleScope;
using v8::Isolate;
using v8::Local;
@@ -241,7 +240,7 @@ void dtrace_gc_done(Isolate* isolate, GCType type, GCCallbackFlags flags) {
}
-void InitDTrace(Environment* env, Handle<Object> target) {
+void InitDTrace(Environment* env, Local<Object> target) {
HandleScope scope(env->isolate());
static struct {
diff --git a/src/node_dtrace.h b/src/node_dtrace.h
index fad453b1ec..9243d02f5a 100644
--- a/src/node_dtrace.h
+++ b/src/node_dtrace.h
@@ -54,7 +54,7 @@ typedef struct {
namespace node {
-void InitDTrace(Environment* env, v8::Handle<v8::Object> target);
+void InitDTrace(Environment* env, v8::Local<v8::Object> target);
} // namespace node
diff --git a/src/node_file.cc b/src/node_file.cc
index f10b99e94b..e1fb1ce4f3 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -32,7 +32,6 @@ using v8::EscapableHandleScope;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -1218,9 +1217,9 @@ void FSInitialize(const FunctionCallbackInfo<Value>& args) {
env->set_fs_stats_constructor_function(stats_constructor);
}
-void InitFs(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context,
+void InitFs(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context,
void* priv) {
Environment* env = Environment::GetCurrent(context);
diff --git a/src/node_file.h b/src/node_file.h
index f242ee4f4f..8192ed9c2f 100644
--- a/src/node_file.h
+++ b/src/node_file.h
@@ -6,7 +6,7 @@
namespace node {
-void InitFs(v8::Handle<v8::Object> target);
+void InitFs(v8::Local<v8::Object> target);
} // namespace node
diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc
index 665ce285be..21be19eb84 100644
--- a/src/node_http_parser.cc
+++ b/src/node_http_parser.cc
@@ -43,7 +43,6 @@ using v8::Exception;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -687,9 +686,9 @@ const struct http_parser_settings Parser::settings = {
};
-void InitHttpParser(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context,
+void InitHttpParser(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context,
void* priv) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> t = env->NewFunctionTemplate(Parser::New);
diff --git a/src/node_http_parser.h b/src/node_http_parser.h
index 6fd8b76c6c..9b49d4d99e 100644
--- a/src/node_http_parser.h
+++ b/src/node_http_parser.h
@@ -7,7 +7,7 @@
namespace node {
-void InitHttpParser(v8::Handle<v8::Object> target);
+void InitHttpParser(v8::Local<v8::Object> target);
} // namespace node
diff --git a/src/node_internals.h b/src/node_internals.h
index 5ea4e0b9bd..1fb58c9274 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -42,32 +42,32 @@ inline v8::Local<TypeName> PersistentToLocal(
const v8::Persistent<TypeName>& persistent);
// Call with valid HandleScope and while inside Context scope.
-v8::Handle<v8::Value> MakeCallback(Environment* env,
- v8::Handle<v8::Object> recv,
+v8::Local<v8::Value> MakeCallback(Environment* env,
+ v8::Local<v8::Object> recv,
const char* method,
int argc = 0,
- v8::Handle<v8::Value>* argv = nullptr);
+ v8::Local<v8::Value>* argv = nullptr);
// Call with valid HandleScope and while inside Context scope.
-v8::Handle<v8::Value> MakeCallback(Environment* env,
- v8::Handle<v8::Object> recv,
+v8::Local<v8::Value> MakeCallback(Environment* env,
+ v8::Local<v8::Object> recv,
uint32_t index,
int argc = 0,
- v8::Handle<v8::Value>* argv = nullptr);
+ v8::Local<v8::Value>* argv = nullptr);
// Call with valid HandleScope and while inside Context scope.
-v8::Handle<v8::Value> MakeCallback(Environment* env,
- v8::Handle<v8::Object> recv,
- v8::Handle<v8::String> symbol,
+v8::Local<v8::Value> MakeCallback(Environment* env,
+ v8::Local<v8::Object> recv,
+ v8::Local<v8::String> symbol,
int argc = 0,
- v8::Handle<v8::Value>* argv = nullptr);
+ v8::Local<v8::Value>* argv = nullptr);
// Call with valid HandleScope and while inside Context scope.
-v8::Handle<v8::Value> MakeCallback(Environment* env,
- v8::Handle<v8::Value> recv,
- v8::Handle<v8::Function> callback,
+v8::Local<v8::Value> MakeCallback(Environment* env,
+ v8::Local<v8::Value> recv,
+ v8::Local<v8::Function> callback,
int argc = 0,
- v8::Handle<v8::Value>* argv = nullptr);
+ v8::Local<v8::Value>* argv = nullptr);
bool KickNextTick();
@@ -77,7 +77,7 @@ bool KickNextTick();
v8::Local<v8::Object> AddressToJS(
Environment* env,
const sockaddr* addr,
- v8::Local<v8::Object> info = v8::Handle<v8::Object>());
+ v8::Local<v8::Object> info = v8::Local<v8::Object>());
template <typename T, int (*F)(const typename T::HandleType*, sockaddr*, int*)>
void GetSockOrPeerName(const v8::FunctionCallbackInfo<v8::Value>& args) {
@@ -130,8 +130,8 @@ inline static int snprintf(char* buf, unsigned int len, const char* fmt, ...) {
#endif
void AppendExceptionLine(Environment* env,
- v8::Handle<v8::Value> er,
- v8::Handle<v8::Message> message);
+ v8::Local<v8::Value> er,
+ v8::Local<v8::Message> message);
NO_RETURN void FatalError(const char* location, const char* message);
@@ -162,7 +162,7 @@ inline bool IsBigEndian() {
}
// parse index for external array data
-inline MUST_USE_RESULT bool ParseArrayIndex(v8::Handle<v8::Value> arg,
+inline MUST_USE_RESULT bool ParseArrayIndex(v8::Local<v8::Value> arg,
size_t def,
size_t* ret) {
if (arg->IsUndefined()) {
diff --git a/src/node_javascript.cc b/src/node_javascript.cc
index bd94a645cf..e8dc4ac4ea 100644
--- a/src/node_javascript.cc
+++ b/src/node_javascript.cc
@@ -11,23 +11,22 @@
namespace node {
-using v8::Handle;
using v8::HandleScope;
using v8::Local;
using v8::Object;
using v8::String;
-Handle<String> MainSource(Environment* env) {
+Local<String> MainSource(Environment* env) {
return OneByteString(env->isolate(), node_native, sizeof(node_native) - 1);
}
-void DefineJavaScript(Environment* env, Handle<Object> target) {
+void DefineJavaScript(Environment* env, Local<Object> target) {
HandleScope scope(env->isolate());
for (int i = 0; natives[i].name; i++) {
if (natives[i].source != node_native) {
Local<String> name = String::NewFromUtf8(env->isolate(), natives[i].name);
- Handle<String> source = String::NewFromUtf8(env->isolate(),
+ Local<String> source = String::NewFromUtf8(env->isolate(),
natives[i].source,
String::kNormalString,
natives[i].source_len);
diff --git a/src/node_javascript.h b/src/node_javascript.h
index 247c3b8c2b..1de6611b31 100644
--- a/src/node_javascript.h
+++ b/src/node_javascript.h
@@ -6,8 +6,8 @@
namespace node {
-void DefineJavaScript(Environment* env, v8::Handle<v8::Object> target);
-v8::Handle<v8::String> MainSource(Environment* env);
+void DefineJavaScript(Environment* env, v8::Local<v8::Object> target);
+v8::Local<v8::String> MainSource(Environment* env);
} // namespace node
diff --git a/src/node_lttng.cc b/src/node_lttng.cc
index 0c63882c79..876bcda92f 100644
--- a/src/node_lttng.cc
+++ b/src/node_lttng.cc
@@ -32,7 +32,6 @@ using v8::GCCallbackFlags;
using v8::GCEpilogueCallback;
using v8::GCPrologueCallback;
using v8::GCType;
-using v8::Handle;
using v8::HandleScope;
using v8::Isolate;
using v8::Local;
@@ -234,7 +233,7 @@ void lttng_gc_done(Isolate* isolate, GCType type, GCCallbackFlags flags) {
NODE_GC_DONE(type, flags, isolate);
}
-void InitLTTNG(Environment* env, Handle<Object> target) {
+void InitLTTNG(Environment* env, Local<Object> target) {
HandleScope scope(env->isolate());
static struct {
diff --git a/src/node_lttng.h b/src/node_lttng.h
index 31f706f758..4e4147438f 100644
--- a/src/node_lttng.h
+++ b/src/node_lttng.h
@@ -33,7 +33,7 @@ typedef struct {
namespace node {
-void InitLTTNG(Environment* env, v8::Handle<v8::Object> target);
+void InitLTTNG(Environment* env, v8::Local<v8::Object> target);
} // namespace node
diff --git a/src/node_object_wrap.h b/src/node_object_wrap.h
index f022662227..2d67bc1db6 100644
--- a/src/node_object_wrap.h
+++ b/src/node_object_wrap.h
@@ -24,7 +24,7 @@ class ObjectWrap {
template <class T>
- static inline T* Unwrap(v8::Handle<v8::Object> handle) {
+ static inline T* Unwrap(v8::Local<v8::Object> handle) {
assert(!handle.IsEmpty());
assert(handle->InternalFieldCount() > 0);
// Cast to ObjectWrap before casting to T. A direct cast from void
@@ -51,7 +51,7 @@ class ObjectWrap {
protected:
- inline void Wrap(v8::Handle<v8::Object> handle) {
+ inline void Wrap(v8::Local<v8::Object> handle) {
assert(persistent().IsEmpty());
assert(handle->InternalFieldCount() > 0);
handle->SetAlignedPointerInInternalField(0, this);
diff --git a/src/node_os.cc b/src/node_os.cc
index 3abc7ccec1..a100090748 100644
--- a/src/node_os.cc
+++ b/src/node_os.cc
@@ -30,7 +30,6 @@ using v8::Array;
using v8::Boolean;
using v8::Context;
using v8::FunctionCallbackInfo;
-using v8::Handle;
using v8::Integer;
using v8::Local;
using v8::Number;
@@ -291,9 +290,9 @@ static void GetHomeDirectory(const FunctionCallbackInfo<Value>& args) {
}
-void Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
env->SetMethod(target, "getHostname", GetHostname);
env->SetMethod(target, "getLoadAvg", GetLoadAvg);
diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc
index 8d27cbc9eb..bd1cb73248 100644
--- a/src/node_stat_watcher.cc
+++ b/src/node_stat_watcher.cc
@@ -14,7 +14,6 @@ namespace node {
using v8::Context;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -22,7 +21,7 @@ using v8::Object;
using v8::Value;
-void StatWatcher::Initialize(Environment* env, Handle<Object> target) {
+void StatWatcher::Initialize(Environment* env, Local<Object> target) {
HandleScope scope(env->isolate());
Local<FunctionTemplate> t = env->NewFunctionTemplate(StatWatcher::New);
diff --git a/src/node_stat_watcher.h b/src/node_stat_watcher.h
index e0ef76601f..bc7929880b 100644
--- a/src/node_stat_watcher.h
+++ b/src/node_stat_watcher.h
@@ -13,7 +13,7 @@ class StatWatcher : public AsyncWrap {
public:
virtual ~StatWatcher() override;
- static void Initialize(Environment* env, v8::Handle<v8::Object> target);
+ static void Initialize(Environment* env, v8::Local<v8::Object> target);
protected:
StatWatcher(Environment* env, v8::Local<v8::Object> wrap);
diff --git a/src/node_v8.cc b/src/node_v8.cc
index db492e3d1a..9f456daec4 100644
--- a/src/node_v8.cc
+++ b/src/node_v8.cc
@@ -11,7 +11,6 @@ using v8::ArrayBuffer;
using v8::Context;
using v8::Function;
using v8::FunctionCallbackInfo;
-using v8::Handle;
using v8::HeapStatistics;
using v8::Isolate;
using v8::Local;
@@ -59,9 +58,9 @@ void SetFlagsFromString(const FunctionCallbackInfo<Value>& args) {
}
-void InitializeV8Bindings(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void InitializeV8Bindings(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
env->SetMethod(target,
"updateHeapStatisticsArrayBuffer",
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index 699d5c453c..50c7a906a6 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -22,7 +22,6 @@ using v8::Array;
using v8::Context;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -43,7 +42,7 @@ enum node_zlib_mode {
};
-void InitZlib(v8::Handle<v8::Object> target);
+void InitZlib(v8::Local<v8::Object> target);
/**
@@ -573,9 +572,9 @@ class ZCtx : public AsyncWrap {
};
-void InitZlib(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context,
+void InitZlib(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context,
void* priv) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> z = env->NewFunctionTemplate(ZCtx::New);
diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc
index 2e1ab5b262..62bfe0a92e 100644
--- a/src/pipe_wrap.cc
+++ b/src/pipe_wrap.cc
@@ -22,7 +22,6 @@ using v8::External;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -70,9 +69,9 @@ Local<Object> PipeWrap::Instantiate(Environment* env, AsyncWrap* parent) {
}
-void PipeWrap::Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void PipeWrap::Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
@@ -123,7 +122,7 @@ void PipeWrap::New(const FunctionCallbackInfo<Value>& args) {
PipeWrap::PipeWrap(Environment* env,
- Handle<Object> object,
+ Local<Object> object,
bool ipc,
AsyncWrap* parent)
: StreamWrap(env,
diff --git a/src/pipe_wrap.h b/src/pipe_wrap.h
index 6c74de984b..eb3d18b80d 100644
--- a/src/pipe_wrap.h
+++ b/src/pipe_wrap.h
@@ -12,15 +12,15 @@ class PipeWrap : public StreamWrap {
uv_pipe_t* UVHandle();
static v8::Local<v8::Object> Instantiate(Environment* env, AsyncWrap* parent);
- static void Initialize(v8::Handle<v8::Object> target,
- v8::Handle<v8::Value> unused,
- v8::Handle<v8::Context> context);
+ static void Initialize(v8::Local<v8::Object> target,
+ v8::Local<v8::Value> unused,
+ v8::Local<v8::Context> context);
size_t self_size() const override { return sizeof(*this); }
private:
PipeWrap(Environment* env,
- v8::Handle<v8::Object> object,
+ v8::Local<v8::Object> object,
bool ipc,
AsyncWrap* parent);
diff --git a/src/process_wrap.cc b/src/process_wrap.cc
index 14bbb9c9e9..adf1606591 100644
--- a/src/process_wrap.cc
+++ b/src/process_wrap.cc
@@ -15,7 +15,6 @@ using v8::Context;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -26,9 +25,9 @@ using v8::Value;
class ProcessWrap : public HandleWrap {
public:
- static void Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+ static void Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> constructor = env->NewFunctionTemplate(New);
constructor->InstanceTemplate()->SetInternalFieldCount(1);
@@ -58,7 +57,7 @@ class ProcessWrap : public HandleWrap {
new ProcessWrap(env, args.This());
}
- ProcessWrap(Environment* env, Handle<Object> object)
+ ProcessWrap(Environment* env, Local<Object> object)
: HandleWrap(env,
object,
reinterpret_cast<uv_handle_t*>(&process_),
diff --git a/src/req-wrap-inl.h b/src/req-wrap-inl.h
index 78c6735302..63229260ec 100644
--- a/src/req-wrap-inl.h
+++ b/src/req-wrap-inl.h
@@ -13,7 +13,7 @@ namespace node {
template <typename T>
ReqWrap<T>::ReqWrap(Environment* env,
- v8::Handle<v8::Object> object,
+ v8::Local<v8::Object> object,
AsyncWrap::ProviderType provider)
: AsyncWrap(env, object, provider) {
if (env->in_domain())
diff --git a/src/req-wrap.h b/src/req-wrap.h
index 27b51425d1..240df76ebf 100644
--- a/src/req-wrap.h
+++ b/src/req-wrap.h
@@ -12,7 +12,7 @@ template <typename T>
class ReqWrap : public AsyncWrap {
public:
inline ReqWrap(Environment* env,
- v8::Handle<v8::Object> object,
+ v8::Local<v8::Object> object,
AsyncWrap::ProviderType provider);
inline ~ReqWrap() override;
inline void Dispatched(); // Call this after the req has been dispatched.
diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc
index 4811aca53a..5f6a6a52bc 100644
--- a/src/signal_wrap.cc
+++ b/src/signal_wrap.cc
@@ -13,7 +13,6 @@ using v8::Context;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -22,9 +21,9 @@ using v8::Value;
class SignalWrap : public HandleWrap {
public:
- static void Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+ static void Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> constructor = env->NewFunctionTemplate(New);
constructor->InstanceTemplate()->SetInternalFieldCount(1);
@@ -52,7 +51,7 @@ class SignalWrap : public HandleWrap {
new SignalWrap(env, args.This());
}
- SignalWrap(Environment* env, Handle<Object> object)
+ SignalWrap(Environment* env, Local<Object> object)
: HandleWrap(env,
object,
reinterpret_cast<uv_handle_t*>(&handle_),
diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc
index 97bccfd4b7..144af3e747 100644
--- a/src/spawn_sync.cc
+++ b/src/spawn_sync.cc
@@ -13,7 +13,6 @@ using v8::Array;
using v8::Context;
using v8::EscapableHandleScope;
using v8::FunctionCallbackInfo;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Isolate;
@@ -340,9 +339,9 @@ void SyncProcessStdioPipe::CloseCallback(uv_handle_t* handle) {
}
-void SyncProcessRunner::Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void SyncProcessRunner::Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
env->SetMethod(target, "spawn", Spawn);
}
diff --git a/src/spawn_sync.h b/src/spawn_sync.h
index 3069df610f..fab2f09eef 100644
--- a/src/spawn_sync.h
+++ b/src/spawn_sync.h
@@ -9,7 +9,6 @@ namespace node {
using v8::Array;
using v8::Context;
using v8::FunctionCallbackInfo;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Isolate;
@@ -129,9 +128,9 @@ class SyncProcessRunner {
};
public:
- static void Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context);
+ static void Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context);
static void Spawn(const FunctionCallbackInfo<Value>& args);
private:
diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h
index dd0bbcfbd8..81114a265e 100644
--- a/src/stream_base-inl.h
+++ b/src/stream_base-inl.h
@@ -13,7 +13,6 @@ namespace node {
using v8::External;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Local;
using v8::Object;
@@ -24,7 +23,7 @@ using v8::Value;
template <class Base>
void StreamBase::AddMethods(Environment* env,
- Handle<FunctionTemplate> t,
+ Local<FunctionTemplate> t,
int flags) {
HandleScope scope(env->isolate());
diff --git a/src/stream_base.cc b/src/stream_base.cc
index d957465abc..3139274c6f 100644
--- a/src/stream_base.cc
+++ b/src/stream_base.cc
@@ -19,7 +19,6 @@ namespace node {
using v8::Array;
using v8::Context;
using v8::FunctionCallbackInfo;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -109,14 +108,14 @@ int StreamBase::Writev(const FunctionCallbackInfo<Value>& args) {
for (size_t i = 0; i < count; i++) {
storage_size = ROUND_UP(storage_size, WriteWrap::kAlignSize);
- Handle<Value> chunk = chunks->Get(i * 2);
+ Local<Value> chunk = chunks->Get(i * 2);
if (Buffer::HasInstance(chunk))
continue;
// Buffer chunk, no additional storage required
// String chunk
- Handle<String> string = chunk->ToString(env->isolate());
+ Local<String> string = chunk->ToString(env->isolate());
enum encoding encoding = ParseEncoding(env->isolate(),
chunks->Get(i * 2 + 1));
size_t chunk_size;
@@ -143,7 +142,7 @@ int StreamBase::Writev(const FunctionCallbackInfo<Value>& args) {
uint32_t bytes = 0;
size_t offset = 0;
for (size_t i = 0; i < count; i++) {
- Handle<Value> chunk = chunks->Get(i * 2);
+ Local<Value> chunk = chunks->Get(i * 2);
// Write buffer
if (Buffer::HasInstance(chunk)) {
@@ -159,7 +158,7 @@ int StreamBase::Writev(const FunctionCallbackInfo<Value>& args) {
char* str_storage = req_wrap->Extra(offset);
size_t str_size = storage_size - offset;
- Handle<String> string = chunk->ToString(env->isolate());
+ Local<String> string = chunk->ToString(env->isolate());
enum encoding encoding = ParseEncoding(env->isolate(),
chunks->Get(i * 2 + 1));
str_size = StringBytes::Write(env->isolate(),
diff --git a/src/stream_base.h b/src/stream_base.h
index c5a0977792..d0e1d4b9b2 100644
--- a/src/stream_base.h
+++ b/src/stream_base.h
@@ -187,7 +187,7 @@ class StreamBase : public StreamResource {
template <class Base>
static inline void AddMethods(Environment* env,
- v8::Handle<v8::FunctionTemplate> target,
+ v8::Local<v8::FunctionTemplate> target,
int flags = kFlagNone);
virtual void* Cast() = 0;
diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc
index ec98acbb30..cd9b2c9064 100644
--- a/src/stream_wrap.cc
+++ b/src/stream_wrap.cc
@@ -27,7 +27,6 @@ using v8::Context;
using v8::EscapableHandleScope;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -40,9 +39,9 @@ using v8::Undefined;
using v8::Value;
-void StreamWrap::Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void StreamWrap::Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> sw =
@@ -81,7 +80,7 @@ StreamWrap::StreamWrap(Environment* env,
void StreamWrap::AddMethods(Environment* env,
- v8::Handle<v8::FunctionTemplate> target,
+ v8::Local<v8::FunctionTemplate> target,
int flags) {
env->SetProtoMethod(target, "setBlocking", SetBlocking);
StreamBase::AddMethods<StreamWrap>(env, target, flags);
diff --git a/src/stream_wrap.h b/src/stream_wrap.h
index 8e4cdf20be..b0d9986db5 100644
--- a/src/stream_wrap.h
+++ b/src/stream_wrap.h
@@ -15,9 +15,9 @@ class StreamWrap;
class StreamWrap : public HandleWrap, public StreamBase {
public:
- static void Initialize(v8::Handle<v8::Object> target,
- v8::Handle<v8::Value> unused,
- v8::Handle<v8::Context> context);
+ static void Initialize(v8::Local<v8::Object> target,
+ v8::Local<v8::Value> unused,
+ v8::Local<v8::Context> context);
int GetFD() override;
void* Cast() override;
@@ -68,7 +68,7 @@ class StreamWrap : public HandleWrap, public StreamBase {
void UpdateWriteQueueSize();
static void AddMethods(Environment* env,
- v8::Handle<v8::FunctionTemplate> target,
+ v8::Local<v8::FunctionTemplate> target,
int flags = StreamBase::kFlagNone);
private:
diff --git a/src/string_bytes.cc b/src/string_bytes.cc
index 7fc03c0f51..90fafd40cd 100644
--- a/src/string_bytes.cc
+++ b/src/string_bytes.cc
@@ -15,7 +15,6 @@
namespace node {
using v8::EscapableHandleScope;
-using v8::Handle;
using v8::HandleScope;
using v8::Isolate;
using v8::Local;
@@ -270,7 +269,7 @@ size_t hex_decode(char* buf,
bool StringBytes::GetExternalParts(Isolate* isolate,
- Handle<Value> val,
+ Local<Value> val,
const char** data,
size_t* len) {
if (Buffer::HasInstance(val)) {
@@ -346,7 +345,7 @@ size_t StringBytes::WriteUCS2(char* buf,
size_t StringBytes::Write(Isolate* isolate,
char* buf,
size_t buflen,
- Handle<Value> val,
+ Local<Value> val,
enum encoding encoding,
int* chars_written) {
HandleScope scope(isolate);
@@ -455,7 +454,7 @@ size_t StringBytes::Write(Isolate* isolate,
bool StringBytes::IsValidString(Isolate* isolate,
- Handle<String> string,
+ Local<String> string,
enum encoding enc) {
if (enc == HEX && string->Length() % 2 != 0)
return false;
@@ -468,7 +467,7 @@ bool StringBytes::IsValidString(Isolate* isolate,
// Will always be at least big enough, but may have some extra
// UTF8 can be as much as 3x the size, Base64 can have 1-2 extra bytes
size_t StringBytes::StorageSize(Isolate* isolate,
- Handle<Value> val,
+ Local<Value> val,
enum encoding encoding) {
HandleScope scope(isolate);
size_t data_size = 0;
@@ -517,7 +516,7 @@ size_t StringBytes::StorageSize(Isolate* isolate,
size_t StringBytes::Size(Isolate* isolate,
- Handle<Value> val,
+ Local<Value> val,
enum encoding encoding) {
HandleScope scope(isolate);
size_t data_size = 0;
diff --git a/src/string_bytes.h b/src/string_bytes.h
index 7c044ebaf5..79520d2470 100644
--- a/src/string_bytes.h
+++ b/src/string_bytes.h
@@ -1,7 +1,7 @@
#ifndef SRC_STRING_BYTES_H_
#define SRC_STRING_BYTES_H_
-// Decodes a v8::Handle<v8::String> or Buffer to a raw char*
+// Decodes a v8::Local<v8::String> or Buffer to a raw char*
#include "v8.h"
#include "node.h"
@@ -24,8 +24,8 @@ class StringBytes {
}
inline bool Decode(Environment* env,
- v8::Handle<v8::String> string,
- v8::Handle<v8::Value> encoding,
+ v8::Local<v8::String> string,
+ v8::Local<v8::Value> encoding,
enum encoding _default) {
enum encoding enc = ParseEncoding(env->isolate(), encoding, _default);
if (!StringBytes::IsValidString(env->isolate(), string, enc)) {
@@ -61,25 +61,25 @@ class StringBytes {
// Example: a HEX string must have a length that's a multiple of two.
// FIXME(bnoordhuis) IsMaybeValidString()? Naming things is hard...
static bool IsValidString(v8::Isolate* isolate,
- v8::Handle<v8::String> string,
+ v8::Local<v8::String> string,
enum encoding enc);
// Fast, but can be 2 bytes oversized for Base64, and
// as much as triple UTF-8 strings <= 65536 chars in length
static size_t StorageSize(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
enum encoding enc);
// Precise byte count, but slightly slower for Base64 and
// very much slower for UTF-8
static size_t Size(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
enum encoding enc);
// If the string is external then assign external properties to data and len,
// then return true. If not return false.
static bool GetExternalParts(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
const char** data,
size_t* len);
@@ -90,7 +90,7 @@ class StringBytes {
static size_t Write(v8::Isolate* isolate,
char* buf,
size_t buflen,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
enum encoding enc,
int* chars_written = nullptr);
@@ -110,25 +110,25 @@ class StringBytes {
NODE_DEPRECATED("Use IsValidString(isolate, ...)",
static inline bool IsValidString(
- v8::Handle<v8::String> string,
+ v8::Local<v8::String> string,
enum encoding enc) {
return IsValidString(v8::Isolate::GetCurrent(), string, enc);
})
NODE_DEPRECATED("Use StorageSize(isolate, ...)",
- static inline size_t StorageSize(v8::Handle<v8::Value> val,
+ static inline size_t StorageSize(v8::Local<v8::Value> val,
enum encoding enc) {
return StorageSize(v8::Isolate::GetCurrent(), val, enc);
})
NODE_DEPRECATED("Use Size(isolate, ...)",
- static inline size_t Size(v8::Handle<v8::Value> val,
+ static inline size_t Size(v8::Local<v8::Value> val,
enum encoding enc) {
return Size(v8::Isolate::GetCurrent(), val, enc);
})
NODE_DEPRECATED("Use GetExternalParts(isolate, ...)",
- static inline bool GetExternalParts(v8::Handle<v8::Value> val,
+ static inline bool GetExternalParts(v8::Local<v8::Value> val,
const char** data,
size_t* len) {
return GetExternalParts(v8::Isolate::GetCurrent(), val, data, len);
@@ -137,7 +137,7 @@ class StringBytes {
NODE_DEPRECATED("Use Write(isolate, ...)",
static inline size_t Write(char* buf,
size_t buflen,
- v8::Handle<v8::Value> val,
+ v8::Local<v8::Value> val,
enum encoding enc,
int* chars_written = nullptr) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc
index d9a35886cb..9bdf8ccc1d 100644
--- a/src/tcp_wrap.cc
+++ b/src/tcp_wrap.cc
@@ -23,7 +23,6 @@ using v8::External;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -64,9 +63,9 @@ Local<Object> TCPWrap::Instantiate(Environment* env, AsyncWrap* parent) {
}
-void TCPWrap::Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void TCPWrap::Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
@@ -146,7 +145,7 @@ void TCPWrap::New(const FunctionCallbackInfo<Value>& args) {
}
-TCPWrap::TCPWrap(Environment* env, Handle<Object> object, AsyncWrap* parent)
+TCPWrap::TCPWrap(Environment* env, Local<Object> object, AsyncWrap* parent)
: StreamWrap(env,
object,
reinterpret_cast<uv_stream_t*>(&handle_),
diff --git a/src/tcp_wrap.h b/src/tcp_wrap.h
index 79404a7e42..4810f1dc1b 100644
--- a/src/tcp_wrap.h
+++ b/src/tcp_wrap.h
@@ -10,9 +10,9 @@ namespace node {
class TCPWrap : public StreamWrap {
public:
static v8::Local<v8::Object> Instantiate(Environment* env, AsyncWrap* parent);
- static void Initialize(v8::Handle<v8::Object> target,
- v8::Handle<v8::Value> unused,
- v8::Handle<v8::Context> context);
+ static void Initialize(v8::Local<v8::Object> target,
+ v8::Local<v8::Value> unused,
+ v8::Local<v8::Context> context);
uv_tcp_t* UVHandle();
@@ -25,7 +25,7 @@ class TCPWrap : public StreamWrap {
int (*F)(const typename T::HandleType*, sockaddr*, int*)>
friend void GetSockOrPeerName(const v8::FunctionCallbackInfo<v8::Value>&);
- TCPWrap(Environment* env, v8::Handle<v8::Object> object, AsyncWrap* parent);
+ TCPWrap(Environment* env, v8::Local<v8::Object> object, AsyncWrap* parent);
~TCPWrap();
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
diff --git a/src/timer_wrap.cc b/src/timer_wrap.cc
index f3d5d1fedb..79fa86953d 100644
--- a/src/timer_wrap.cc
+++ b/src/timer_wrap.cc
@@ -14,7 +14,6 @@ using v8::Context;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -25,9 +24,9 @@ const uint32_t kOnTimeout = 0;
class TimerWrap : public HandleWrap {
public:
- static void Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+ static void Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> constructor = env->NewFunctionTemplate(New);
constructor->InstanceTemplate()->SetInternalFieldCount(1);
@@ -60,7 +59,7 @@ class TimerWrap : public HandleWrap {
new TimerWrap(env, args.This());
}
- TimerWrap(Environment* env, Handle<Object> object)
+ TimerWrap(Environment* env, Local<Object> object)
: HandleWrap(env,
object,
reinterpret_cast<uv_handle_t*>(&handle_),
diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc
index 56dac0fe1f..b466afb152 100644
--- a/src/tls_wrap.cc
+++ b/src/tls_wrap.cc
@@ -24,7 +24,6 @@ using v8::Exception;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::Integer;
using v8::Local;
using v8::Null;
@@ -865,9 +864,9 @@ int TLSWrap::SelectSNIContextCallback(SSL* s, int* ad, void* arg) {
#endif // SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
-void TLSWrap::Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void TLSWrap::Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
env->SetMethod(target, "wrap", TLSWrap::Wrap);
diff --git a/src/tls_wrap.h b/src/tls_wrap.h
index 7a9dc888cc..47cbf27fe2 100644
--- a/src/tls_wrap.h
+++ b/src/tls_wrap.h
@@ -27,9 +27,9 @@ class TLSWrap : public crypto::SSLWrap<TLSWrap>,
public:
~TLSWrap() override;
- static void Initialize(v8::Handle<v8::Object> target,
- v8::Handle<v8::Value> unused,
- v8::Handle<v8::Context> context);
+ static void Initialize(v8::Local<v8::Object> target,
+ v8::Local<v8::Value> unused,
+ v8::Local<v8::Context> context);
void* Cast() override;
int GetFD() override;
diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc
index eaec271937..76a2472f8a 100644
--- a/src/tty_wrap.cc
+++ b/src/tty_wrap.cc
@@ -18,7 +18,6 @@ using v8::Context;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::Integer;
using v8::Local;
using v8::Object;
@@ -27,9 +26,9 @@ using v8::String;
using v8::Value;
-void TTYWrap::Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void TTYWrap::Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
@@ -130,7 +129,7 @@ void TTYWrap::New(const FunctionCallbackInfo<Value>& args) {
}
-TTYWrap::TTYWrap(Environment* env, Handle<Object> object, int fd, bool readable)
+TTYWrap::TTYWrap(Environment* env, Local<Object> object, int fd, bool readable)
: StreamWrap(env,
object,
reinterpret_cast<uv_stream_t*>(&handle_),
diff --git a/src/tty_wrap.h b/src/tty_wrap.h
index 6d423e1ae5..581972a3b9 100644
--- a/src/tty_wrap.h
+++ b/src/tty_wrap.h
@@ -9,9 +9,9 @@ namespace node {
class TTYWrap : public StreamWrap {
public:
- static void Initialize(v8::Handle<v8::Object> target,
- v8::Handle<v8::Value> unused,
- v8::Handle<v8::Context> context);
+ static void Initialize(v8::Local<v8::Object> target,
+ v8::Local<v8::Value> unused,
+ v8::Local<v8::Context> context);
uv_tty_t* UVHandle();
@@ -19,7 +19,7 @@ class TTYWrap : public StreamWrap {
private:
TTYWrap(Environment* env,
- v8::Handle<v8::Object> object,
+ v8::Local<v8::Object> object,
int fd,
bool readable);
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc
index 71cc547675..4c0d38dfb2 100644
--- a/src/udp_wrap.cc
+++ b/src/udp_wrap.cc
@@ -19,7 +19,6 @@ using v8::External;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Local;
@@ -61,7 +60,7 @@ static void NewSendWrap(const FunctionCallbackInfo<Value>& args) {
}
-UDPWrap::UDPWrap(Environment* env, Handle<Object> object, AsyncWrap* parent)
+UDPWrap::UDPWrap(Environment* env, Local<Object> object, AsyncWrap* parent)
: HandleWrap(env,
object,
reinterpret_cast<uv_handle_t*>(&handle_),
@@ -71,9 +70,9 @@ UDPWrap::UDPWrap(Environment* env, Handle<Object> object, AsyncWrap* parent)
}
-void UDPWrap::Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void UDPWrap::Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
diff --git a/src/udp_wrap.h b/src/udp_wrap.h
index 1582fb46ce..2a92cb340d 100644
--- a/src/udp_wrap.h
+++ b/src/udp_wrap.h
@@ -13,9 +13,9 @@ namespace node {
class UDPWrap: public HandleWrap {
public:
- static void Initialize(v8::Handle<v8::Object> target,
- v8::Handle<v8::Value> unused,
- v8::Handle<v8::Context> context);
+ static void Initialize(v8::Local<v8::Object> target,
+ v8::Local<v8::Value> unused,
+ v8::Local<v8::Context> context);
static void GetFD(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>&);
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -46,7 +46,7 @@ class UDPWrap: public HandleWrap {
int (*F)(const typename T::HandleType*, sockaddr*, int*)>
friend void GetSockOrPeerName(const v8::FunctionCallbackInfo<v8::Value>&);
- UDPWrap(Environment* env, v8::Handle<v8::Object> object, AsyncWrap* parent);
+ UDPWrap(Environment* env, v8::Local<v8::Object> object, AsyncWrap* parent);
static void DoBind(const v8::FunctionCallbackInfo<v8::Value>& args,
int family);
diff --git a/src/util.cc b/src/util.cc
index a793368c2c..903fbbba13 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -3,7 +3,7 @@
namespace node {
-Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Handle<v8::Value> value)
+Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> value)
: length_(0), str_(str_st_) {
if (value.IsEmpty())
return;
diff --git a/src/util.h b/src/util.h
index ea17a15574..24c633e286 100644
--- a/src/util.h
+++ b/src/util.h
@@ -170,7 +170,7 @@ inline TypeName* Unwrap(v8::Local<v8::Object> object);
class Utf8Value {
public:
- explicit Utf8Value(v8::Isolate* isolate, v8::Handle<v8::Value> value);
+ explicit Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> value);
~Utf8Value() {
if (str_ != str_st_)
diff --git a/src/uv.cc b/src/uv.cc
index 2208ebde3c..d03e775008 100644
--- a/src/uv.cc
+++ b/src/uv.cc
@@ -9,7 +9,7 @@ namespace uv {
using v8::Context;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
-using v8::Handle;
+using v8::Local;
using v8::Integer;
using v8::Object;
using v8::String;
@@ -26,9 +26,9 @@ void ErrName(const FunctionCallbackInfo<Value>& args) {
}
-void Initialize(Handle<Object> target,
- Handle<Value> unused,
- Handle<Context> context) {
+void Initialize(Local<Object> target,
+ Local<Value> unused,
+ Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "errname"),
env->NewFunctionTemplate(ErrName)->GetFunction());