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>
This commit is contained in:
parent
e2ea82b9ce
commit
c6a54af42a
@ -410,7 +410,8 @@ void AsyncWrap::PopAsyncIds(const FunctionCallbackInfo<Value>& args) {
|
|||||||
void AsyncWrap::AsyncReset(const FunctionCallbackInfo<Value>& args) {
|
void AsyncWrap::AsyncReset(const FunctionCallbackInfo<Value>& args) {
|
||||||
AsyncWrap* wrap;
|
AsyncWrap* wrap;
|
||||||
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
|
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);
|
wrap->AsyncReset(execution_async_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,7 +419,8 @@ void AsyncWrap::AsyncReset(const FunctionCallbackInfo<Value>& args) {
|
|||||||
void AsyncWrap::QueueDestroyAsyncId(const FunctionCallbackInfo<Value>& args) {
|
void AsyncWrap::QueueDestroyAsyncId(const FunctionCallbackInfo<Value>& args) {
|
||||||
CHECK(args[0]->IsNumber());
|
CHECK(args[0]->IsNumber());
|
||||||
AsyncWrap::EmitDestroy(
|
AsyncWrap::EmitDestroy(
|
||||||
Environment::GetCurrent(args), args[0]->NumberValue());
|
Environment::GetCurrent(args),
|
||||||
|
args[0].As<Number>()->Value());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsyncWrap::AddWrapMethods(Environment* env,
|
void AsyncWrap::AddWrapMethods(Environment* env,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user