| Index: src/mark-compact.cc
|
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc
|
| index a864c346740a8c05156ca809888f5a9959cb48a8..fe17544bc602b764482610eeaca00545b3eb0ade 100644
|
| --- a/src/mark-compact.cc
|
| +++ b/src/mark-compact.cc
|
| @@ -884,13 +884,8 @@ class StaticMarkingVisitor : public StaticVisitorBase {
|
| if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub()) {
|
| IC::Clear(rinfo->pc());
|
| target = Code::GetCodeFromTargetAddress(rinfo->target_address());
|
| - } else {
|
| - if (FLAG_cleanup_code_caches_at_gc &&
|
| - target->kind() == Code::STUB &&
|
| - target->major_key() == CodeStub::CallFunction &&
|
| - target->has_function_cache()) {
|
| - CallFunctionStub::Clear(heap, rinfo->pc());
|
| - }
|
| + } else if (FLAG_cleanup_code_caches_at_gc && CallStub::HasCache(target)) {
|
| + CallStub::Clear(heap, rinfo->pc());
|
| }
|
| MarkBit code_mark = Marking::MarkBitFrom(target);
|
| heap->mark_compact_collector()->MarkObject(target, code_mark);
|
|
|