summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUjjwal Sharma <usharma1998@gmail.com>2018-08-03 00:53:40 +0530
committerUjjwal Sharma <usharma1998@gmail.com>2018-08-08 01:54:08 +0530
commitc6a54af42aa4c80dba76d1ff8ecbd4f0e6ed7e44 (patch)
tree1848cf6f573b16d0d7b477e28df4d6f4b7ed3ec2 /src
parente2ea82b9ce573f1c94651b6a853d5abaf259cb8f (diff)
downloadandroid-node-v8-c6a54af42aa4c80dba76d1ff8ecbd4f0e6ed7e44.tar.gz
android-node-v8-c6a54af42aa4c80dba76d1ff8ecbd4f0e6ed7e44.tar.bz2
android-node-v8-c6a54af42aa4c80dba76d1ff8ecbd4f0e6ed7e44.zip
src: remove calls to deprecated v8 functions (NumberValue)
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 <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/async_wrap.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/async_wrap.cc b/src/async_wrap.cc
index d47c0d6cfb..7f2a0ece2f 100644
--- a/src/async_wrap.cc
+++ b/src/async_wrap.cc
@@ -410,7 +410,8 @@ void AsyncWrap::PopAsyncIds(const FunctionCallbackInfo<Value>& args) {
void AsyncWrap::AsyncReset(const FunctionCallbackInfo<Value>& 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<Number>()->Value() : -1;
wrap->AsyncReset(execution_async_id);
}
@@ -418,7 +419,8 @@ void AsyncWrap::AsyncReset(const FunctionCallbackInfo<Value>& args) {
void AsyncWrap::QueueDestroyAsyncId(const FunctionCallbackInfo<Value>& args) {
CHECK(args[0]->IsNumber());
AsyncWrap::EmitDestroy(
- Environment::GetCurrent(args), args[0]->NumberValue());
+ Environment::GetCurrent(args),
+ args[0].As<Number>()->Value());
}
void AsyncWrap::AddWrapMethods(Environment* env,