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

Unified Diff: src/mark-compact.cc

Issue 8041017: Fix bug in PointersUpdatingVisitor::UpdatePointer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index e5178ecbfe0cd5f2d3f6b5db02d5a3b81efd8963..422d44b307af2d7e4bc444f1e148ec339234808f 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -483,7 +483,7 @@ void MarkCompactCollector::Prepare(GCTracer* tracer) {
ASSERT(state_ == IDLE);
state_ = PREPARE_GC;
#endif
- ASSERT(!FLAG_always_compact || !FLAG_never_compact);
+ if (FLAG_never_compact) FLAG_always_compact = false;
if (collect_maps_) CreateBackPointers();
#ifdef ENABLE_GDB_JIT_INTERFACE
@@ -2454,11 +2454,13 @@ class PointersUpdatingVisitor: public ObjectVisitor {
HeapObject* obj = HeapObject::cast(*p);
- if (heap_->InNewSpace(obj) ||
- MarkCompactCollector::IsOnEvacuationCandidate(obj)) {
- ASSERT(obj->map_word().IsForwardingAddress());
+ MapWord map_word = obj->map_word();
+ if (map_word.IsForwardingAddress()) {
+ ASSERT(heap_->InFromSpace(obj) ||
+ MarkCompactCollector::IsOnEvacuationCandidate(obj));
*p = obj->map_word().ToForwardingAddress();
- ASSERT(!MarkCompactCollector::IsOnEvacuationCandidate(*p));
+ ASSERT(!heap_->InFromSpace(*p) &&
+ !MarkCompactCollector::IsOnEvacuationCandidate(*p));
}
}
« 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