Skip to content

Commit

Permalink
src: remove calls to deprecated v8 functions (NumberValue)
Browse files Browse the repository at this point in the history
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 authored and rvagg committed Aug 15, 2018
1 parent 77ce40f commit e90e56f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/async_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e90e56f

Please sign in to comment.