Index: src/objects.cc |
=================================================================== |
--- src/objects.cc (revision 5008) |
+++ src/objects.cc (working copy) |
@@ -5292,7 +5292,15 @@ |
RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT) | |
RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); |
- for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { |
+ // Use the relocation info pointer before it is visited by |
+ // the heap compaction in the next statement. |
+ RelocIterator it(this, mode_mask); |
+ |
+ IteratePointers(v, |
+ kRelocationInfoOffset, |
+ kRelocationInfoOffset + kPointerSize); |
+ |
+ for (; !it.done(); it.next()) { |
it.rinfo()->Visit(v); |
} |
@@ -5312,14 +5320,6 @@ |
// copy code |
memmove(instruction_start(), desc.buffer, desc.instr_size); |
- // fill gap with zero bytes |
- { byte* p = instruction_start() + desc.instr_size; |
- byte* q = relocation_start(); |
- while (p < q) { |
- *p++ = 0; |
- } |
- } |
- |
// copy reloc info |
memmove(relocation_start(), |
desc.buffer + desc.buffer_size - desc.reloc_size, |