Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index bc7985ea5f3e148197847a48ab780cc621affcfa..40333fe1f838037fe4822f067a010fbc1032045a 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -809,6 +809,8 @@ class CodeFlusher { |
isolate_->heap()->mark_compact_collector()-> |
RecordCodeEntrySlot(slot, target); |
+ RecordSharedFunctionInfoCodeSlot(shared); |
+ |
candidate = next_candidate; |
} |
@@ -831,12 +833,21 @@ class CodeFlusher { |
candidate->set_code(lazy_compile); |
} |
+ RecordSharedFunctionInfoCodeSlot(candidate); |
+ |
candidate = next_candidate; |
} |
shared_function_info_candidates_head_ = NULL; |
} |
+ void RecordSharedFunctionInfoCodeSlot(SharedFunctionInfo* shared) { |
+ Object** slot = HeapObject::RawField(shared, |
+ SharedFunctionInfo::kCodeOffset); |
+ isolate_->heap()->mark_compact_collector()-> |
+ RecordSlot(slot, slot, HeapObject::cast(*slot)); |
+ } |
+ |
static JSFunction** GetNextCandidateField(JSFunction* candidate) { |
return reinterpret_cast<JSFunction**>( |
candidate->address() + JSFunction::kCodeEntryOffset); |