diff --git a/src/async_wrap.cc b/src/async_wrap.cc index 7ef3dafdf992c5..46d63694dee1a2 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,