Index: src/heap-profiler.cc |
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc |
index 92ded7b3477a67054b1dbb4e2e906329feefdf04..8b7135490be09c609e701ef8634ceac41acb3b4f 100644 |
--- a/src/heap-profiler.cc |
+++ b/src/heap-profiler.cc |
@@ -111,10 +111,10 @@ int Clusterizer::CalculateNetworkSize(JSObject* obj) { |
int size = obj->Size(); |
// If 'properties' and 'elements' are non-empty (thus, non-shared), |
// take their size into account. |
- if (FixedArray::cast(obj->properties())->length() != 0) { |
+ if (obj->properties() != Heap::empty_fixed_array()) { |
size += obj->properties()->Size(); |
} |
- if (FixedArray::cast(obj->elements())->length() != 0) { |
+ if (obj->elements() != Heap::empty_fixed_array()) { |
size += obj->elements()->Size(); |
} |
// For functions, also account non-empty context and literals sizes. |