diff options
author | Ujjwal Sharma <usharma1998@gmail.com> | 2018-08-29 17:46:36 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2018-09-02 17:32:15 +0300 |
commit | 37cd10a1165537d25cd73454ffa81a4e964a56f7 (patch) | |
tree | d9146f1c17e1a7f5e0cfe9d3e8833c66662e7f7c /src/node_i18n.cc | |
parent | 5da155398ef8645c76872c6db3114a3e796a80da (diff) |
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 <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Diffstat (limited to 'src/node_i18n.cc')
-rw-r--r-- | src/node_i18n.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_i18n.cc b/src/node_i18n.cc index e5d5c0d412d..9543ab60737 100644 --- a/src/node_i18n.cc +++ b/src/node_i18n.cc @@ -819,9 +819,9 @@ static void GetStringWidth(const FunctionCallbackInfo<Value>& 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; } |