Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: src/heap/object-stats.cc

Issue 2393153002: [heap] ObjectStats: Handle empty deoptimization input data (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698