mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
src: improve StringBytes::Encode perf on UTF8
Co-authored-by: Gürgün Dayıoğlu <hey@gurgun.day> PR-URL: https://github.com/nodejs/node/pull/61131 Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
1 parent
99c29eb261
commit
ceaa200d16
2 files changed
+21
No files matched your search
@@ -186,6 +186,8 @@ void BindingData::DecodeUTF8(const FunctionCallbackInfo<Value>& args) {
|
||||
return node::THROW_ERR_ENCODING_INVALID_ENCODED_DATA(
|
||||
env->isolate(), "The encoded data was not valid for encoding utf-8");
|
||||
}
|
||||
|
||||
// TODO(chalker): save on utf8 validity recheck in StringBytes::Encode()
|
||||
}
|
||||
|
||||
if (length == 0) return args.GetReturnValue().SetEmptyString();
|
||||
|
||||
Reference in new issue
Block a user