diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2018-09-02 18:49:11 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-09-05 13:59:25 +0300 |
commit | 594a84d8f2cb3c630744487d02dbcff05675d6cf (patch) | |
tree | ae066c7a853f3a42ee0febc3d9027c2cdc9bc013 /src/process_wrap.cc | |
parent | d6a43438d6ed3f262cc87fe2ebd0c46a87c1ff57 (diff) |
src: remove calls to deprecated V8 functions (Int32Value)
Remove all calls to deprecated V8 functions (here: Value::Int32Value)
inside the code.
PR-URL: https://github.com/nodejs/node/pull/22662
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
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 e06afd84ffb..70f656ae5e6 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -36,6 +36,7 @@ using v8::Context; using v8::FunctionCallbackInfo; using v8::FunctionTemplate; using v8::HandleScope; +using v8::Int32; using v8::Integer; using v8::Local; using v8::Number; @@ -158,7 +159,7 @@ class ProcessWrap : public HandleWrap { js_options->Get(context, env->uid_string()).ToLocalChecked(); if (!uid_v->IsUndefined() && !uid_v->IsNull()) { CHECK(uid_v->IsInt32()); - const int32_t uid = uid_v->Int32Value(context).FromJust(); + const int32_t uid = uid_v.As<Int32>()->Value(); options.flags |= UV_PROCESS_SETUID; options.uid = static_cast<uv_uid_t>(uid); } @@ -168,7 +169,7 @@ class ProcessWrap : public HandleWrap { js_options->Get(context, env->gid_string()).ToLocalChecked(); if (!gid_v->IsUndefined() && !gid_v->IsNull()) { CHECK(gid_v->IsInt32()); - const int32_t gid = gid_v->Int32Value(context).FromJust(); + const int32_t gid = gid_v.As<Int32>()->Value(); options.flags |= UV_PROCESS_SETGID; options.gid = static_cast<uv_gid_t>(gid); } |