From 37cd10a1165537d25cd73454ffa81a4e964a56f7 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Wed, 29 Aug 2018 16:46:36 +0200 Subject: src: remove calls to deprecated v8 functions (Uint32Value) Remove all calls to deprecated v8 functions (here: Value::Uint32Value) inside the code (src directory only). PR-URL: https://github.com/nodejs/node/pull/22143 Reviewed-By: Anna Henningsen Reviewed-By: Denys Otrishko --- src/node_i18n.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/node_i18n.cc') diff --git a/src/node_i18n.cc b/src/node_i18n.cc index e5d5c0d412..9543ab6073 100644 --- a/src/node_i18n.cc +++ b/src/node_i18n.cc @@ -819,9 +819,9 @@ static void GetStringWidth(const FunctionCallbackInfo& args) { bool expand_emoji_sequence = args[2]->IsTrue(); if (args[0]->IsNumber()) { - args.GetReturnValue().Set( - GetColumnWidth(args[0]->Uint32Value(), - ambiguous_as_full_width)); + uint32_t val; + if (!args[0]->Uint32Value(env->context()).To(&val)) return; + args.GetReturnValue().Set(GetColumnWidth(val, ambiguous_as_full_width)); return; } -- cgit v1.2.3