From 37cd10a1165537d25cd73454ffa81a4e964a56f7 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Wed, 29 Aug 2018 16:46:36 +0200 Subject: src: remove calls to deprecated v8 functions (Uint32Value) Remove all calls to deprecated v8 functions (here: Value::Uint32Value) inside the code (src directory only). PR-URL: https://github.com/nodejs/node/pull/22143 Reviewed-By: Anna Henningsen Reviewed-By: Denys Otrishko --- src/tcp_wrap.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/tcp_wrap.cc') diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index ab8b30e846..7b544d1531 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -48,6 +48,7 @@ using v8::Integer; using v8::Local; using v8::Object; using v8::String; +using v8::Uint32; using v8::Value; using AsyncHooks = Environment::AsyncHooks; @@ -180,7 +181,7 @@ void TCPWrap::SetKeepAlive(const FunctionCallbackInfo& args) { args.Holder(), args.GetReturnValue().Set(UV_EBADF)); int enable = args[0]->Int32Value(); - unsigned int delay = args[1]->Uint32Value(); + unsigned int delay = args[1].As()->Value(); int err = uv_tcp_keepalive(&wrap->handle_, enable, delay); args.GetReturnValue().Set(err); } @@ -277,7 +278,7 @@ void TCPWrap::Connect(const FunctionCallbackInfo& args) { Local req_wrap_obj = args[0].As(); node::Utf8Value ip_address(env->isolate(), args[1]); - int port = args[2]->Uint32Value(); + int port = args[2].As()->Value(); sockaddr_in addr; int err = uv_ip4_addr(*ip_address, port, &addr); -- cgit v1.2.3