Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index 489b92aca987fd251128e262404e03baafbeaa41..ca35d4ab6d1eb8b9772e79f46fdaf4d7df28c7e5 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -2884,6 +2884,8 @@ class PointersUpdatingVisitor : public ObjectVisitor { |
// Avoid unnecessary changes that might unnecessary flush the instruction |
// cache. |
if (target != old_target) { |
+ // TODO(jochen): Remove again after fixing http://crbug.com/452095 |
+ CHECK(target->IsHeapObject() == old_target->IsHeapObject()); |
rinfo->set_target_object(target); |
} |
} |
@@ -2894,6 +2896,8 @@ class PointersUpdatingVisitor : public ObjectVisitor { |
Object* old_target = target; |
VisitPointer(&target); |
if (target != old_target) { |
+ // TODO(jochen): Remove again after fixing http://crbug.com/452095 |
+ CHECK(target->IsHeapObject() == old_target->IsHeapObject()); |
rinfo->set_target_address(Code::cast(target)->instruction_start()); |
} |
} |
@@ -2904,6 +2908,8 @@ class PointersUpdatingVisitor : public ObjectVisitor { |
DCHECK(stub != NULL); |
VisitPointer(&stub); |
if (stub != rinfo->code_age_stub()) { |
+ // TODO(jochen): Remove again after fixing http://crbug.com/452095 |
+ CHECK(stub->IsHeapObject() == rinfo->code_age_stub()->IsHeapObject()); |
rinfo->set_code_age_stub(Code::cast(stub)); |
} |
} |
@@ -2915,6 +2921,9 @@ class PointersUpdatingVisitor : public ObjectVisitor { |
rinfo->IsPatchedDebugBreakSlotSequence())); |
Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address()); |
VisitPointer(&target); |
+ // TODO(jochen): Remove again after fixing http://crbug.com/452095 |
+ CHECK(target->IsCode() && |
+ HAS_SMI_TAG(Code::cast(target)->instruction_start())); |
rinfo->set_call_address(Code::cast(target)->instruction_start()); |
} |
@@ -3059,6 +3068,9 @@ static void UpdatePointer(HeapObject** address, HeapObject* object) { |
object->GetHeap()->lo_space()->FindPage( |
reinterpret_cast<Address>(address)) != NULL); |
if (map_word.IsForwardingAddress()) { |
+ // TODO(jochen): Remove again after fixing http://crbug.com/452095 |
+ CHECK((*address)->IsHeapObject() == |
+ map_word.ToForwardingAddress()->IsHeapObject()); |
// Update the corresponding slot. |
*address = map_word.ToForwardingAddress(); |
} |