Skip to content

Commit caf58f2

Browse files
committed
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: #58070 Refs: #58048
1 parent 9acf6af commit caf58f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/node_buffer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ uint32_t FastByteLengthUtf8(
742742
Local<String> sourceStr = sourceValue.As<String>();
743743

744744
if (!sourceStr->IsExternalOneByte()) {
745-
return sourceStr->Utf8Length(isolate);
745+
return sourceStr->Utf8LengthV2(isolate);
746746
}
747747
auto source = sourceStr->GetExternalOneByteStringResource();
748748
// For short inputs, the function call overhead to simdutf is maybe

0 commit comments

Comments
 (0)