Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index 44fa6b834dcc544b8bc29f15a9801b6f41527ac6..e26653495ecf2ae7ff6bb9211798212dec8cbc1b 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -2663,9 +2663,8 @@ |
Address dst_addr = dst->address(); |
Address src_addr = src->address(); |
DCHECK(heap()->AllowedToBeMigrated(src, dest)); |
- DCHECK(dest != LO_SPACE); |
+ DCHECK(dest != LO_SPACE && size <= Page::kMaxRegularHeapObjectSize); |
if (dest == OLD_SPACE) { |
- DCHECK_OBJECT_SIZE(size); |
DCHECK(evacuation_slots_buffer != nullptr); |
DCHECK(IsAligned(size, kPointerSize)); |
switch (src->ContentType()) { |
@@ -2689,14 +2688,12 @@ |
evacuation_slots_buffer); |
} |
} else if (dest == CODE_SPACE) { |
- DCHECK_CODEOBJECT_SIZE(size, heap()->code_space()); |
DCHECK(evacuation_slots_buffer != nullptr); |
PROFILE(isolate(), CodeMoveEvent(src_addr, dst_addr)); |
heap()->MoveBlock(dst_addr, src_addr, size); |
RecordMigratedCodeObjectSlot(dst_addr, evacuation_slots_buffer); |
Code::cast(dst)->Relocate(dst_addr - src_addr); |
} else { |
- DCHECK_OBJECT_SIZE(size); |
DCHECK(evacuation_slots_buffer == nullptr); |
DCHECK(dest == NEW_SPACE); |
heap()->MoveBlock(dst_addr, src_addr, size); |
@@ -3080,6 +3077,8 @@ |
bool MarkCompactCollector::TryPromoteObject(HeapObject* object, |
int object_size) { |
+ DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); |
+ |
OldSpace* old_space = heap()->old_space(); |
HeapObject* target = nullptr; |