summaryrefslogtreecommitdiff
path: root/src/string_bytes.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-08-31 16:57:03 +0200
committerAnna Henningsen <anna@addaleax.net>2018-09-03 22:33:42 +0200
commit71f633a32f1f5617c1c7b60ad936342a579bff74 (patch)
treebcfc550c80f66a630cc149fbc80f204d0ca6cc62 /src/string_bytes.h
parent6455bea52ba262cea8d1c706ec8a2eec192ec643 (diff)
downloadandroid-node-v8-71f633a32f1f5617c1c7b60ad936342a579bff74.tar.gz
android-node-v8-71f633a32f1f5617c1c7b60ad936342a579bff74.tar.bz2
android-node-v8-71f633a32f1f5617c1c7b60ad936342a579bff74.zip
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>
Diffstat (limited to 'src/string_bytes.h')
-rw-r--r--src/string_bytes.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/string_bytes.h b/src/string_bytes.h
index 9e64fa0ee5..87a296663e 100644
--- a/src/string_bytes.h
+++ b/src/string_bytes.h
@@ -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,