Index: src/heap/spaces-inl.h |
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h |
index 136dc3b1a3ffc0e0d52c3a264c872c017441fa69..76011768faf3d8e7f5337f4241f1742b5c0bc9e5 100644 |
--- a/src/heap/spaces-inl.h |
+++ b/src/heap/spaces-inl.h |
@@ -133,7 +133,12 @@ HeapObject* HeapObjectIterator::FromCurrentPage() { |
} |
if (!obj->IsFiller()) { |
- DCHECK_OBJECT_SIZE(obj_size); |
+ if (obj->IsCode()) { |
+ DCHECK_EQ(space_, space_->heap()->code_space()); |
+ DCHECK_CODEOBJECT_SIZE(obj_size, space_); |
+ } else { |
+ DCHECK_OBJECT_SIZE(obj_size); |
+ } |
return obj; |
} |
} |