Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 9b7e0a76c3948ebcdf0ffe59856f997bd12bde39..00d00d5ee6f01c6f63160af1a79ece38f05968a9 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -8813,10 +8813,15 @@ void Code::CopyFrom(const CodeDesc& desc) { |
ASSERT(Marking::Color(this) == Marking::WHITE_OBJECT); |
// copy code |
+ CHECK(IsCode()); |
+ CHECK(relocation_info()->IsByteArray()); |
+ CHECK(reinterpret_cast<intptr_t>(instruction_start()) == |
+ reinterpret_cast<intptr_t>(this) + Code::kHeaderSize - kHeapObjectTag); |
memmove(instruction_start(), desc.buffer, desc.instr_size); |
// copy reloc info |
// TODO(mstarzinger): Remove once we found the bug. |
+ CHECK(IsCode()); |
CHECK(relocation_info()->IsByteArray()); |
memmove(relocation_start(), |
desc.buffer + desc.buffer_size - desc.reloc_size, |