diff options
author | Ujjwal Sharma <usharma1998@gmail.com> | 2018-08-29 17:12:36 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-09-05 14:42:38 +0300 |
commit | f464ac3c74ca2b2411c578b4dcb52838f569e9fa (patch) | |
tree | ad733001a2528375cc3fd202a54c80ea8dfbab9c /src/process_wrap.cc | |
parent | 31ca5dc75a0d76d4aeee174e70e335e4ea7428ac (diff) |
src: remove calls to deprecated v8 functions (IntegerValue)
Remove all calls to deprecated v8 functions (here:
Value::IntegerValue) inside the code (src directory only).
Co-authored-by: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/22129
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/process_wrap.cc')
-rw-r--r-- | src/process_wrap.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/process_wrap.cc b/src/process_wrap.cc index 70f656ae5e6..2841595c1f1 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -132,8 +132,9 @@ class ProcessWrap : public HandleWrap { options->stdio[i].data.stream = stream; } else { Local<String> fd_key = env->fd_string(); - int fd = static_cast<int>( - stdio->Get(context, fd_key).ToLocalChecked()->IntegerValue()); + Local<Value> fd_value = stdio->Get(context, fd_key).ToLocalChecked(); + CHECK(fd_value->IsNumber()); + int fd = static_cast<int>(fd_value.As<Integer>()->Value()); options->stdio[i].flags = UV_INHERIT_FD; options->stdio[i].data.fd = fd; } |