Index: src/heap/objects-visiting-inl.h |
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h |
index 01a38cb5ca5280d564412b252048727f59621b8b..ed6db7b9b4b5f7924f716ab44136f7f0b79881c6 100644 |
--- a/src/heap/objects-visiting-inl.h |
+++ b/src/heap/objects-visiting-inl.h |
@@ -409,7 +409,8 @@ void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( |
if (FLAG_cleanup_code_caches_at_gc) { |
shared->ClearTypeFeedbackInfoAtGCTime(); |
} |
- if (FLAG_flush_optimized_code_cache && |
+ if ((FLAG_flush_optimized_code_cache || |
+ heap->isolate()->serializer_enabled()) && |
!shared->optimized_code_map()->IsSmi()) { |
// Always flush the optimized code map if requested by flag. |
shared->ClearOptimizedCodeMap(); |