Chromium Code Reviews| Index: src/mark-compact.cc |
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
| index c06bfd7f7323825d4c0f278c04e39260eaf3cc4f..c9c40a7528849e7c841b76987e799c0feb2e5272 100644 |
| --- a/src/mark-compact.cc |
| +++ b/src/mark-compact.cc |
| @@ -1631,11 +1631,15 @@ class MarkCompactMarkingVisitor::ObjectStatsTracker< |
| TRANSITION_ARRAY_SUB_TYPE, |
| fixed_array_size); |
| } |
| - if (map_obj->code_cache() != heap->empty_fixed_array()) { |
| + Object* code_cache = map_obj->code_cache(); |
| + if (!code_cache->IsFixedArray()) { |
| + code_cache = CodeCache::cast(code_cache)->default_cache(); |
| + } |
|
danno
2013/07/16 08:02:30
The previous for lines are unneeded (and wrong).
danno
2013/07/16 08:21:50
Sorry, ignore my previous comment. I mis-read the
rmcilroy
2013/07/16 12:05:58
Ahh I see. I was confused because I couldn't alway
|
| + if (code_cache != heap->empty_descriptor_array()) { |
|
danno
2013/07/16 08:02:30
Just preface the code above with "code_cache->IsFi
danno
2013/07/16 08:21:50
Ignore this comment.
rmcilroy
2013/07/16 12:05:58
Ack
|
| heap->RecordObjectStats( |
| FIXED_ARRAY_TYPE, |
| MAP_CODE_CACHE_SUB_TYPE, |
| - FixedArray::cast(map_obj->code_cache())->Size()); |
| + FixedArray::cast(code_cache)->Size()); |
| } |
| ObjectStatsVisitBase(kVisitMap, map, obj); |
| } |