BUG=404020
LOG=Y
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/
525343002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23564
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
// to be serialized.
if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() &&
(target->ic_state() == MEGAMORPHIC || target->ic_state() == GENERIC ||
- target->ic_state() == POLYMORPHIC || heap->flush_monomorphic_ics() ||
+ target->ic_state() == POLYMORPHIC ||
+ (heap->flush_monomorphic_ics() && !target->is_weak_stub()) ||
heap->isolate()->serializer_enabled() ||
target->ic_age() != heap->global_ic_age() ||
target->is_invalidated_weak_stub())) {