Skip to content

Commit 8b5ada4

Browse files
tniessentargos
authored andcommitted
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 PR-URL: #58156 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 23416cc commit 8b5ada4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)