GeezerVison is showing github.com — src: remove calls to deprecated v8 functions (NumberValue) · nodejs/node@e90e56f
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/async_wrap.cc +4-2Lines changed: 4 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -410,15 +410,17 @@ void AsyncWrap::PopAsyncIds(const FunctionCallbackInfo<Value>& args) { |
410 | 410 | void AsyncWrap::AsyncReset(const FunctionCallbackInfo<Value>& args) { |
411 | 411 | AsyncWrap* wrap; |
412 | 412 | 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; |
414 | 415 | wrap->AsyncReset(execution_async_id); |
415 | 416 | } |
416 | 417 |
|
417 | 418 |
|
418 | 419 | void AsyncWrap::QueueDestroyAsyncId(const FunctionCallbackInfo<Value>& args) { |
419 | 420 | CHECK(args[0]->IsNumber()); |
420 | 421 | AsyncWrap::EmitDestroy( |
421 | | - Environment::GetCurrent(args), args[0]->NumberValue()); |
| 422 | + Environment::GetCurrent(args), |
| 423 | + args[0].As<Number>()->Value()); |
422 | 424 | } |
423 | 425 |
|
424 | 426 | void AsyncWrap::AddWrapMethods(Environment* env, |
|