diff options
Diffstat (limited to 'deps/v8/src/unicode-decoder.cc')
-rw-r--r-- | deps/v8/src/unicode-decoder.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/v8/src/unicode-decoder.cc b/deps/v8/src/unicode-decoder.cc index bb520990f0..2289e08342 100644 --- a/deps/v8/src/unicode-decoder.cc +++ b/deps/v8/src/unicode-decoder.cc @@ -67,6 +67,7 @@ void Utf8DecoderBase::WriteUtf16Slow(const uint8_t* stream, // There's a total lack of bounds checking for stream // as it was already done in Reset. stream += cursor; + DCHECK(stream_length >= cursor); stream_length -= cursor; if (character > unibrow::Utf16::kMaxNonSurrogateCharCode) { *data++ = Utf16::LeadSurrogate(character); @@ -78,7 +79,6 @@ void Utf8DecoderBase::WriteUtf16Slow(const uint8_t* stream, data_length -= 1; } } - DCHECK(stream_length >= 0); } } // namespace unibrow |