Skip to content

Commit

Permalink
src: remove misleading flag in TwoByteValue
Browse files Browse the repository at this point in the history
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 Mar 1, 2017
1 parent a218fa3 commit a7f7724
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a7f7724

Please sign in to comment.