Skip to content
Permalink
Browse files

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: #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>
  • Loading branch information...
ryzokuken committed Aug 2, 2018
1 parent e2ea82b commit c6a54af42aa4c80dba76d1ff8ecbd4f0e6ed7e44
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/async_wrap.cc
@@ -410,15 +410,17 @@ 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);
}


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,

0 comments on commit c6a54af

Please sign in to comment.
You can’t perform that action at this time.