From c6a54af42aa4c80dba76d1ff8ecbd4f0e6ed7e44 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Fri, 3 Aug 2018 00:53:40 +0530 Subject: [PATCH] src: remove calls to deprecated v8 functions (NumberValue) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove all calls to deprecated v8 functions (here: Value::NumberValue) inside the code (src directory only). PR-URL: https://github.com/nodejs/node/pull/22094 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso --- src/async_wrap.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/async_wrap.cc b/src/async_wrap.cc index d47c0d6cfb6f44..7f2a0ece2f0055 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -410,7 +410,8 @@ void AsyncWrap::PopAsyncIds(const FunctionCallbackInfo& args) { void AsyncWrap::AsyncReset(const FunctionCallbackInfo& args) { AsyncWrap* wrap; ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder()); - double execution_async_id = args[0]->IsNumber() ? args[0]->NumberValue() : -1; + double execution_async_id = + args[0]->IsNumber() ? args[0].As()->Value() : -1; wrap->AsyncReset(execution_async_id); } @@ -418,7 +419,8 @@ void AsyncWrap::AsyncReset(const FunctionCallbackInfo& args) { void AsyncWrap::QueueDestroyAsyncId(const FunctionCallbackInfo& args) { CHECK(args[0]->IsNumber()); AsyncWrap::EmitDestroy( - Environment::GetCurrent(args), args[0]->NumberValue()); + Environment::GetCurrent(args), + args[0].As()->Value()); } void AsyncWrap::AddWrapMethods(Environment* env,