Skip to content

Commit a7f7724

Browse files
committed
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent a218fa3 commit a7f7724

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/util.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ TwoByteValue::TwoByteValue(Isolate* isolate, Local<Value> value) {
4848
const size_t storage = string->Length() + 1;
4949
AllocateSufficientStorage(storage);
5050

51-
const int flags =
52-
String::NO_NULL_TERMINATION | String::REPLACE_INVALID_UTF8;
51+
const int flags = String::NO_NULL_TERMINATION;
5352
const int length = string->Write(out(), 0, storage, flags);
5453
SetLengthAndZeroTerminate(length);
5554
}

0 commit comments

Comments
 (0)