Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: src/parsing/scanner-character-streams.h

Issue 1941843002: Fix ExternalTwobyteStringUtf16CharacterStream::PushBack(kEndOfInput) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/scanner-character-streams.h
diff --git a/src/parsing/scanner-character-streams.h b/src/parsing/scanner-character-streams.h
index 603db93d022f9c0548219459adb610c214f1e7ab..7e065cf89d35a5df603919a335a3482caa4c0886 100644
--- a/src/parsing/scanner-character-streams.h
+++ b/src/parsing/scanner-character-streams.h
@@ -158,8 +158,10 @@ class ExternalTwoByteStringUtf16CharacterStream: public Utf16CharacterStream {
void PushBack(uc32 character) override {
DCHECK(buffer_cursor_ > raw_data_);
- buffer_cursor_--;
pos_--;
+ if (character != kEndOfInput) {
+ buffer_cursor_--;
+ }
}
bool SetBookmark() override;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698