Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaƫl Zasso <targos@protonmail.com>2018-09-02 18:49:11 +0300
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-09-05 13:59:25 +0300
commit594a84d8f2cb3c630744487d02dbcff05675d6cf (patch)
treeae066c7a853f3a42ee0febc3d9027c2cdc9bc013 /src/node_i18n.cc
parentd6a43438d6ed3f262cc87fe2ebd0c46a87c1ff57 (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/node_i18n.cc')
-rw-r--r--src/node_i18n.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/node_i18n.cc b/src/node_i18n.cc
index 9543ab60737..abe8addfadc 100644
--- a/src/node_i18n.cc
+++ b/src/node_i18n.cc
@@ -87,6 +87,7 @@ namespace node {
using v8::Context;
using v8::FunctionCallbackInfo;
using v8::HandleScope;
+using v8::Int32;
using v8::Isolate;
using v8::Local;
using v8::MaybeLocal;
@@ -502,7 +503,8 @@ void Transcode(const FunctionCallbackInfo<Value>&args) {
void ICUErrorName(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
- UErrorCode status = static_cast<UErrorCode>(args[0]->Int32Value());
+ CHECK(args[0]->IsInt32());
+ UErrorCode status = static_cast<UErrorCode>(args[0].As<Int32>()->Value());
args.GetReturnValue().Set(
String::NewFromUtf8(env->isolate(),
u_errorName(status),