Index: src/objects.cc |
=================================================================== |
--- src/objects.cc (revision 2887) |
+++ src/objects.cc (working copy) |
@@ -4967,7 +4967,7 @@ |
!it.done(); it.next()) { |
Address ic_addr = it.rinfo()->target_address(); |
ASSERT(ic_addr != NULL); |
- HeapObject* code = HeapObject::FromAddress(ic_addr - Code::kHeaderSize); |
+ HeapObject* code = Code::GetCodeFromTargetAddress(ic_addr); |
ASSERT(code->IsHeapObject()); |
it.rinfo()->set_target_object(code); |
} |
@@ -4980,7 +4980,7 @@ |
if (it.rinfo()->IsCallInstruction()) { |
Address addr = it.rinfo()->call_address(); |
ASSERT(addr != NULL); |
- HeapObject* code = HeapObject::FromAddress(addr - Code::kHeaderSize); |
+ HeapObject* code = Code::GetCodeFromTargetAddress(addr); |
ASSERT(code->IsHeapObject()); |
it.rinfo()->set_call_object(code); |
} |