Index: Source/devtools/front_end/timeline/TimelineMemoryOverview.js |
diff --git a/Source/devtools/front_end/timeline/TimelineMemoryOverview.js b/Source/devtools/front_end/timeline/TimelineMemoryOverview.js |
index c00107b26dbc0d95aa8341867e69feb54db229bf..17f2fc0d6c898a6735abe10ab1b1690c58a05e14 100644 |
--- a/Source/devtools/front_end/timeline/TimelineMemoryOverview.js |
+++ b/Source/devtools/front_end/timeline/TimelineMemoryOverview.js |
@@ -68,10 +68,8 @@ WebInspector.TimelineMemoryOverview.prototype = { |
*/ |
function calculateMinMaxSizes(record) |
{ |
- if (record.type() !== WebInspector.TimelineModel.RecordType.UpdateCounters) |
- return; |
- var counters = record.data(); |
- if (!counters.jsHeapSizeUsed) |
+ var counters = record.counters(); |
+ if (!counters || !counters.jsHeapSizeUsed) |
return; |
maxUsedHeapSize = Math.max(maxUsedHeapSize, counters.jsHeapSizeUsed); |
minUsedHeapSize = Math.min(minUsedHeapSize, counters.jsHeapSizeUsed); |
@@ -92,10 +90,8 @@ WebInspector.TimelineMemoryOverview.prototype = { |
*/ |
function buildHistogram(record) |
{ |
- if (record.type() !== WebInspector.TimelineModel.RecordType.UpdateCounters) |
- return; |
- var counters = record.data(); |
- if (!counters.jsHeapSizeUsed) |
+ var counters = record.counters(); |
+ if (!counters || !counters.jsHeapSizeUsed) |
return; |
var x = Math.round((record.endTime() - minTime) * xFactor); |
var y = Math.round((counters.jsHeapSizeUsed - minUsedHeapSize) * yFactor); |