Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 7a25855d5316ed643837ba356b0a6e64ffebbdc6..24730c6c0a5db4a56d379772c0079989dbd0a729 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -2327,8 +2327,11 @@ class PointersUpdatingVisitor: public ObjectVisitor { |
void VisitCodeTarget(RelocInfo* rinfo) { |
ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); |
Object* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
+ Object* old_target = target; |
VisitPointer(&target); |
- rinfo->set_target_address(Code::cast(target)->instruction_start()); |
+ if (target != old_target) { |
+ rinfo->set_target_address(Code::cast(target)->instruction_start()); |
+ } |
} |
void VisitDebugTarget(RelocInfo* rinfo) { |