summaryrefslogtreecommitdiff
path: root/src/util.cc
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2017-02-16 20:39:10 -0800
committerTimothy Gu <timothygu99@gmail.com>2017-02-28 18:39:17 -0800
commita7f772416731b740d2a451ff15e2c9c98dbab50a (patch)
treeda2d27ead319b6bf4ef670d1c1ab0cd953954512 /src/util.cc
parenta218fa381f202d8645cbc771feed74072d4b8ce8 (diff)
downloadandroid-node-v8-a7f772416731b740d2a451ff15e2c9c98dbab50a.tar.gz
android-node-v8-a7f772416731b740d2a451ff15e2c9c98dbab50a.tar.bz2
android-node-v8-a7f772416731b740d2a451ff15e2c9c98dbab50a.zip
src: remove misleading flag in TwoByteValue
String::REPLACE_INVALID_UTF8 is only applied in V8's String::WriteUtf8() (i.e. Utf8Value). PR-URL: https://github.com/nodejs/node/pull/11436 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/util.cc b/src/util.cc
index 9fb5c3fd28..fb23f75ede 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -48,8 +48,7 @@ TwoByteValue::TwoByteValue(Isolate* isolate, Local<Value> value) {
const size_t storage = string->Length() + 1;
AllocateSufficientStorage(storage);
- const int flags =
- String::NO_NULL_TERMINATION | String::REPLACE_INVALID_UTF8;
+ const int flags = String::NO_NULL_TERMINATION;
const int length = string->Write(out(), 0, storage, flags);
SetLengthAndZeroTerminate(length);
}