summaryrefslogtreecommitdiff
path: root/src/process_wrap.cc
diff options
context:
space:
mode:
authorUjjwal Sharma <usharma1998@gmail.com>2018-08-29 16:12:36 +0200
committerMichaël Zasso <targos@protonmail.com>2018-09-05 13:42:38 +0200
commitf464ac3c74ca2b2411c578b4dcb52838f569e9fa (patch)
treead733001a2528375cc3fd202a54c80ea8dfbab9c /src/process_wrap.cc
parent31ca5dc75a0d76d4aeee174e70e335e4ea7428ac (diff)
downloadandroid-node-v8-f464ac3c74ca2b2411c578b4dcb52838f569e9fa.tar.gz
android-node-v8-f464ac3c74ca2b2411c578b4dcb52838f569e9fa.tar.bz2
android-node-v8-f464ac3c74ca2b2411c578b4dcb52838f569e9fa.zip
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.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/process_wrap.cc b/src/process_wrap.cc
index 70f656ae5e..2841595c1f 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;
}