Index: src/objects-visiting-inl.h |
diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h |
index 169c405175d88111833f20ec2eb2282f14427965..60d63ccf6105f3033d947830b605d308ff85afb4 100644 |
--- a/src/objects-visiting-inl.h |
+++ b/src/objects-visiting-inl.h |
@@ -428,9 +428,6 @@ void StaticMarkingVisitor<StaticVisitor>::VisitCode( |
Map* map, HeapObject* object) { |
Heap* heap = map->GetHeap(); |
Code* code = Code::cast(object); |
- if (FLAG_cleanup_code_caches_at_gc) { |
- code->ClearTypeFeedbackInfo(heap); |
- } |
if (FLAG_age_code && !Serializer::enabled()) { |
code->MakeOlder(heap->mark_compact_collector()->marking_parity()); |
} |
@@ -446,6 +443,9 @@ void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( |
if (shared->ic_age() != heap->global_ic_age()) { |
shared->ResetForNewContext(heap->global_ic_age()); |
} |
+ if (FLAG_cleanup_code_caches_at_gc) { |
+ shared->ClearTypeFeedbackInfo(); |
+ } |
if (FLAG_cache_optimized_code && |
FLAG_flush_optimized_code_cache && |
!shared->optimized_code_map()->IsSmi()) { |