Index: src/heap/mark-compact.h |
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h |
index 21b0e4c62fa55f82cfcf28a8134c7fb8257f64c0..4be6946c128078f0b09e07ba7730db2d07aceb97 100644 |
--- a/src/heap/mark-compact.h |
+++ b/src/heap/mark-compact.h |
@@ -473,8 +473,9 @@ class MarkCompactCollector { |
} |
INLINE(static bool IsOnEvacuationCandidate(Object* obj)) { |
- return Page::FromAddress(reinterpret_cast<Address>(obj)) |
- ->IsEvacuationCandidate(); |
+ return obj->IsHeapObject() && |
+ Page::FromAddress(reinterpret_cast<Address>(obj)) |
+ ->IsEvacuationCandidate(); |
} |
void RecordRelocSlot(Code* host, RelocInfo* rinfo, Object* target); |