From 2e675c4fa36a5d5b9fcf4c46b1fc9238623e0440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 11 Oct 2025 09:57:05 +0200 Subject: [PATCH] benchmark: use non-deprecated WriteUtf8V2 method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/60173 Reviewed-By: Chengzhong Wu Reviewed-By: Vinícius Lourenço Claro Cardoso Reviewed-By: Richard Lau Reviewed-By: Matteo Collina Reviewed-By: Rafael Gonzaga Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- benchmark/napi/function_args/binding.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benchmark/napi/function_args/binding.cc b/benchmark/napi/function_args/binding.cc index e7c3cb4058..5cdca8bd35 100644 --- a/benchmark/napi/function_args/binding.cc +++ b/benchmark/napi/function_args/binding.cc @@ -23,7 +23,8 @@ void CallWithString(const FunctionCallbackInfo& args) { Local str = args[0].As(); const size_t length = str->Utf8LengthV2(args.GetIsolate()) + 1; char* buf = new char[length]; - str->WriteUtf8(args.GetIsolate(), buf, length); + str->WriteUtf8V2( + args.GetIsolate(), buf, length, String::WriteFlags::kNullTerminate); delete[] buf; } }