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

Unified Diff: src/spaces-inl.h

Issue 113267: Reapply r1900, r1897, r1895 with a fix.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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/spaces.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces-inl.h
===================================================================
--- src/spaces-inl.h (revision 1915)
+++ src/spaces-inl.h (working copy)
@@ -64,15 +64,16 @@
// PageIterator
bool PageIterator::has_next() {
- return cur_page_ != stop_page_;
+ return prev_page_ != stop_page_;
}
Page* PageIterator::next() {
ASSERT(has_next());
- Page* result = cur_page_;
- cur_page_ = cur_page_->next_page();
- return result;
+ prev_page_ = (prev_page_ == NULL)
+ ? space_->first_page_
+ : prev_page_->next_page();
+ return prev_page_;
}
« no previous file with comments | « src/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698