From f464ac3c74ca2b2411c578b4dcb52838f569e9fa Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Wed, 29 Aug 2018 16:12:36 +0200 Subject: src: remove calls to deprecated v8 functions (IntegerValue) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove all calls to deprecated v8 functions (here: Value::IntegerValue) inside the code (src directory only). Co-authored-by: Michaƫl Zasso PR-URL: https://github.com/nodejs/node/pull/22129 Reviewed-By: Anna Henningsen --- src/tcp_wrap.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/tcp_wrap.cc') diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index dd507e6ebd..d8080319aa 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -207,7 +207,10 @@ void TCPWrap::Open(const FunctionCallbackInfo& args) { ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder(), args.GetReturnValue().Set(UV_EBADF)); - int fd = static_cast(args[0]->IntegerValue()); + int64_t val; + if (!args[0]->IntegerValue(args.GetIsolate()->GetCurrentContext()).To(&val)) + return; + int fd = static_cast(val); int err = uv_tcp_open(&wrap->handle_, fd); if (err == 0) -- cgit v1.2.3