Skip to content

Commit 4edb139

Browse files
authored
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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b0cf2e2 commit 4edb139

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)