diff options
author | Michaël Zasso <targos@protonmail.com> | 2018-08-26 10:30:32 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-08-29 12:28:19 +0200 |
commit | b2f0cfa6b0e139a2f990d4e1e7104abf015fe8e7 (patch) | |
tree | e3e86531acf52d314d21ffb24f5bc0d55589fd7e /benchmark | |
parent | 17dd620e58f32f2e44b12b139b76f6c3d7abae75 (diff) | |
download | node-new-b2f0cfa6b0e139a2f990d4e1e7104abf015fe8e7.tar.gz |
src: use String::Utf8Length with isolate
PR-URL: https://github.com/nodejs/node/pull/22531
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/napi/function_args/binding.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmark/napi/function_args/binding.cc b/benchmark/napi/function_args/binding.cc index 2c8fc7231f..d0c1a07921 100644 --- a/benchmark/napi/function_args/binding.cc +++ b/benchmark/napi/function_args/binding.cc @@ -19,7 +19,7 @@ void CallWithString(const FunctionCallbackInfo<Value>& args) { assert(args.Length() == 1 && args[0]->IsString()); if (args.Length() == 1 && args[0]->IsString()) { Local<String> str = args[0].As<String>(); - const int32_t length = str->Utf8Length() + 1; + const int32_t length = str->Utf8Length(args.GetIsolate()) + 1; char* buf = new char[length]; str->WriteUtf8(args.GetIsolate(), buf, length); delete [] buf; |