0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

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:
Ujjwal Sharma 2018-08-03 00:53:40 +05:30
parent e2ea82b9ce
commit c6a54af42a
No known key found for this signature in database
GPG Key ID: 1FD3B47B83F46621

View File

@ -410,7 +410,8 @@ 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);
}
@ -418,7 +419,8 @@ void AsyncWrap::AsyncReset(const FunctionCallbackInfo<Value>& args) {
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,