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

Unified Diff: src/heap.cc

Issue 398013003: Always sweep precisely. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/flag-definitions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 3b36ef548f2c0e704639e47971d4ce95314f037b..c53c9a75ec71ee5ae6ce36e8588c9e1a2b2c5dc4 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -4208,6 +4208,8 @@ STRUCT_LIST(MAKE_CASE)
bool Heap::IsHeapIterable() {
+ // TODO(hpayer): This function is not correct. Allocation folding in old
+ // space breaks the iterability.
return (old_pointer_space()->swept_precisely() &&
old_data_space()->swept_precisely() &&
new_space_top_after_last_gc_ == new_space()->top());
@@ -4219,6 +4221,9 @@ void Heap::MakeHeapIterable() {
if (!IsHeapIterable()) {
CollectAllGarbage(kMakeHeapIterableMask, "Heap::MakeHeapIterable");
}
+ if (mark_compact_collector()->sweeping_in_progress()) {
+ mark_compact_collector()->EnsureSweepingCompleted();
+ }
ASSERT(IsHeapIterable());
}
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698