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

Unified Diff: src/scanner.h

Issue 6246004: Fix bug when the scanner does a pushback at the end of input. (Closed)
Patch Set: Created 9 years, 11 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 | « src/preparser-api.cc ('k') | src/scanner.cc » ('j') | src/scanner-base.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.h
diff --git a/src/scanner.h b/src/scanner.h
index bdf899b54df4fb53b699a2f5780e672b03f86bda..d7621825a975e5f2b5a91a266007b45ddbaff9f0 100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -43,7 +43,7 @@ class BufferedUC16CharacterStream: public UC16CharacterStream {
BufferedUC16CharacterStream();
virtual ~BufferedUC16CharacterStream();
- virtual void PushBack(uc16 character);
+ virtual void PushBack(uc32 character);
protected:
static const unsigned kBufferSize = 512;
@@ -107,11 +107,12 @@ class ExternalTwoByteStringUC16CharacterStream: public UC16CharacterStream {
int end_position);
virtual ~ExternalTwoByteStringUC16CharacterStream();
- virtual void PushBack(uc16 character) {
+ virtual void PushBack(uc32 character) {
ASSERT(buffer_cursor_ > raw_data_);
buffer_cursor_--;
pos_--;
}
+
protected:
virtual unsigned SlowSeekForward(unsigned delta) {
// Fast case always handles seeking.
« no previous file with comments | « src/preparser-api.cc ('k') | src/scanner.cc » ('j') | src/scanner-base.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698