mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
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 PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
23416cce0a
commit
8b5ada4b31
1 file changed
+1
-1
+1
-1
@@ -742,7 +742,7 @@ uint32_t FastByteLengthUtf8(
|
||||
Local<String> sourceStr = sourceValue.As<String>();
|
||||
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user