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

Unified Diff: src/preparser-api.cc

Issue 6529032: Merge 6168:6800 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 10 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.cc ('k') | src/prettyprinter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser-api.cc
===================================================================
--- src/preparser-api.cc (revision 6800)
+++ src/preparser-api.cc (working copy)
@@ -69,8 +69,12 @@
}
}
- virtual void PushBack(uc16 ch) {
+ virtual void PushBack(uc32 ch) {
ASSERT(pos_ > 0);
+ if (ch == kEndOfInput) {
+ pos_--;
+ return;
+ }
if (buffer_cursor_ <= pushback_buffer_) {
// No more room in the current buffer to do pushbacks.
if (pushback_buffer_end_cache_ == NULL) {
@@ -98,7 +102,8 @@
buffer_end_ = pushback_buffer_backing_ + pushback_buffer_backing_size_;
}
}
- pushback_buffer_[buffer_cursor_ - pushback_buffer_- 1] = ch;
+ pushback_buffer_[buffer_cursor_ - pushback_buffer_- 1] =
+ static_cast<uc16>(ch);
pos_--;
}
« no previous file with comments | « src/preparser.cc ('k') | src/prettyprinter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698