Index: src/heap/object-stats.cc |
diff --git a/src/heap/object-stats.cc b/src/heap/object-stats.cc |
index 9f534a20e4ccf8850dc6ea5fd25e906a4eb63eb1..2e8f346fce11badc72712fd84d77ccc7a2fae529 100644 |
--- a/src/heap/object-stats.cc |
+++ b/src/heap/object-stats.cc |
@@ -441,8 +441,10 @@ |
} |
void ObjectStatsCollector::RecordScriptDetails(Script* obj) { |
- FixedArray* infos = FixedArray::cast(obj->shared_function_infos()); |
- RecordFixedArrayHelper(obj, infos, SHARED_FUNCTION_INFOS_SUB_TYPE, 0); |
+ Object* infos = WeakFixedArray::cast(obj->shared_function_infos()); |
+ if (infos->IsWeakFixedArray()) |
+ RecordFixedArrayHelper(obj, WeakFixedArray::cast(infos), |
+ SHARED_FUNCTION_INFOS_SUB_TYPE, 0); |
} |
void ObjectStatsCollector::RecordMapDetails(Map* map_obj) { |