summaryrefslogtreecommitdiff
path: root/src/node_dtrace.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-09-02 17:49:11 +0200
committerMichaël Zasso <targos@protonmail.com>2018-09-06 08:54:58 +0200
commit416cfeae140029da80c8de33c8d0ad888d369639 (patch)
tree3db0bccd1538f1b96486518a9a2f2def594c171a /src/node_dtrace.cc
parent015a17f94718a52cd20fd48ce98813c20f198a02 (diff)
downloadnode-new-416cfeae140029da80c8de33c8d0ad888d369639.tar.gz
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/node_dtrace.cc')
-rw-r--r--src/node_dtrace.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc
index 66e24afcac..517d32064e 100644
--- a/src/node_dtrace.cc
+++ b/src/node_dtrace.cc
@@ -69,13 +69,15 @@ using v8::Value;
if ((*(const char **)valp = *_##member) == nullptr) \
*(const char **)valp = "<unknown>";
-#define SLURP_INT(obj, member, valp) \
- if (!(obj)->IsObject()) { \
- return node::THROW_ERR_INVALID_ARG_TYPE(env, \
- "expected object for " #obj " to contain integer member " #member);\
- } \
- *valp = obj->Get(OneByteString(env->isolate(), #member)) \
- ->Int32Value();
+#define SLURP_INT(obj, member, valp) \
+ if (!(obj)->IsObject()) { \
+ return node::THROW_ERR_INVALID_ARG_TYPE( \
+ env, \
+ "expected object for " #obj " to contain integer member " #member); \
+ } \
+ *valp = obj->Get(OneByteString(env->isolate(), #member)) \
+ ->Int32Value(env->context()) \
+ .FromJust();
#define SLURP_OBJECT(obj, member, valp) \
if (!(obj)->IsObject()) { \