mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
src: allow UTF-16 in generic StringBytes decode call
This allows removing a number of special cases in other parts of the code, at least one of which was incorrect in expecting aligned input when that was not guaranteed. Fixes: https://github.com/nodejs/node/issues/22358 PR-URL: https://github.com/nodejs/node/pull/22622 Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
1 parent
45388f7546
commit
79556e5f4e
6 files changed
+40
-96
No files matched your search
@@ -90,7 +90,6 @@ class StringBytes {
|
||||
int* chars_written = nullptr);
|
||||
|
||||
// Take the bytes in the src, and turn it into a Buffer or String.
|
||||
// Don't call with encoding=UCS2.
|
||||
static v8::MaybeLocal<v8::Value> Encode(v8::Isolate* isolate,
|
||||
const char* buf,
|
||||
size_t buflen,
|
||||
|
||||
Reference in new issue
Block a user