From caf58f2579511af5242ed9d91e514edbd8b3fda7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 4 May 2025 12:34:05 +0100 Subject: [PATCH] buffer: use Utf8LengthV2() instead of Utf8Length() `Utf8Length()` is deprecated and was replaced during the V8 update, but a subsequent commit introduced a new occurrence. Refs: https://github.com/nodejs/node/pull/58070 Refs: https://github.com/nodejs/node/pull/58048 --- src/node_buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 19f343a7f174e4..dddde546c79f0d 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -742,7 +742,7 @@ uint32_t FastByteLengthUtf8( Local sourceStr = sourceValue.As(); if (!sourceStr->IsExternalOneByte()) { - return sourceStr->Utf8Length(isolate); + return sourceStr->Utf8LengthV2(isolate); } auto source = sourceStr->GetExternalOneByteStringResource(); // For short inputs, the function call overhead to simdutf is maybe