From a7f772416731b740d2a451ff15e2c9c98dbab50a Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Thu, 16 Feb 2017 20:39:10 -0800 Subject: 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 Reviewed-By: James M Snell --- src/util.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/util.cc') 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) { 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); } -- cgit v1.2.3