Index: src/heap/object-stats.cc |
diff --git a/src/heap/object-stats.cc b/src/heap/object-stats.cc |
index 4bc94bafe82dade2fc1637e6b855fc6d796bec06..6e4b50ec249aca90dbab76cc43307892067b6cf2 100644 |
--- a/src/heap/object-stats.cc |
+++ b/src/heap/object-stats.cc |
@@ -509,9 +509,11 @@ void ObjectStatsCollector::RecordCodeDetails(Code* code) { |
if (code->kind() == Code::Kind::OPTIMIZED_FUNCTION) { |
DeoptimizationInputData* input_data = |
DeoptimizationInputData::cast(code->deoptimization_data()); |
- RecordFixedArrayHelper(code->deoptimization_data(), |
- input_data->LiteralArray(), |
- OPTIMIZED_CODE_LITERALS_SUB_TYPE, 0); |
+ if (input_data->length() > 0) { |
+ RecordFixedArrayHelper(code->deoptimization_data(), |
+ input_data->LiteralArray(), |
+ OPTIMIZED_CODE_LITERALS_SUB_TYPE, 0); |
+ } |
} |
RecordFixedArrayHelper(code, code->handler_table(), HANDLER_TABLE_SUB_TYPE, |
0); |