Skip to content
Permalink
Browse files

src: remove misleading flag in TwoByteValue

String::REPLACE_INVALID_UTF8 is only applied in V8's
String::WriteUtf8() (i.e. Utf8Value).

PR-URL: #11436
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
TimothyGu committed Feb 17, 2017
1 parent a218fa3 commit a7f772416731b740d2a451ff15e2c9c98dbab50a
Showing with 1 addition and 2 deletions.
  1. +1 −2 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);
}

0 comments on commit a7f7724

Please sign in to comment.
You can’t perform that action at this time.