Skip to content

Commit e90e56f

Browse files
ryzokukenrvagg
authored andcommitted
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>
1 parent 77ce40f commit e90e56f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/async_wrap.cc

+4-2
Original file line numberDiff line numberDiff line change
@@ -410,15 +410,17 @@ void AsyncWrap::PopAsyncIds(const FunctionCallbackInfo<Value>& args) {
410410
void AsyncWrap::AsyncReset(const FunctionCallbackInfo<Value>& args) {
411411
AsyncWrap* wrap;
412412
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
413-
double execution_async_id = args[0]->IsNumber() ? args[0]->NumberValue() : -1;
413+
double execution_async_id =
414+
args[0]->IsNumber() ? args[0].As<Number>()->Value() : -1;
414415
wrap->AsyncReset(execution_async_id);
415416
}
416417

417418

418419
void AsyncWrap::QueueDestroyAsyncId(const FunctionCallbackInfo<Value>& args) {
419420
CHECK(args[0]->IsNumber());
420421
AsyncWrap::EmitDestroy(
421-
Environment::GetCurrent(args), args[0]->NumberValue());
422+
Environment::GetCurrent(args),
423+
args[0].As<Number>()->Value());
422424
}
423425

424426
void AsyncWrap::AddWrapMethods(Environment* env,

0 commit comments

Comments
 (0)