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 17f2fc0d6c898a6735abe10ab1b1690c58a05e14..f0c1a91f76a7411b0f041e8ad4da8e732669c4b8 100644 |
--- a/Source/devtools/front_end/timeline/TimelineMemoryOverview.js |
+++ b/Source/devtools/front_end/timeline/TimelineMemoryOverview.js |
@@ -32,10 +32,12 @@ |
* @constructor |
* @extends {WebInspector.TimelineOverviewBase} |
* @param {!WebInspector.TimelineModel} model |
+ * @param {!WebInspector.TimelineUIUtils} uiUtils |
*/ |
-WebInspector.TimelineMemoryOverview = function(model) |
+WebInspector.TimelineMemoryOverview = function(model, uiUtils) |
{ |
WebInspector.TimelineOverviewBase.call(this, model); |
+ this._uiUtils = uiUtils; |
this.element.id = "timeline-overview-memory"; |
this._heapSizeLabel = this.element.createChild("div", "memory-graph-label"); |
@@ -63,12 +65,13 @@ WebInspector.TimelineMemoryOverview.prototype = { |
var minUsedHeapSize = 100000000000; |
var minTime = this._model.minimumRecordTime(); |
var maxTime = this._model.maximumRecordTime(); |
+ var uiUtils = this._uiUtils; |
/** |
* @param {!WebInspector.TimelineModel.Record} record |
*/ |
function calculateMinMaxSizes(record) |
{ |
- var counters = record.counters(); |
+ var counters = uiUtils.countersForRecord(record); |
if (!counters || !counters.jsHeapSizeUsed) |
return; |
maxUsedHeapSize = Math.max(maxUsedHeapSize, counters.jsHeapSizeUsed); |
@@ -90,7 +93,7 @@ WebInspector.TimelineMemoryOverview.prototype = { |
*/ |
function buildHistogram(record) |
{ |
- var counters = record.counters(); |
+ var counters = uiUtils.countersForRecord(record); |
if (!counters || !counters.jsHeapSizeUsed) |
return; |
var x = Math.round((record.endTime() - minTime) * xFactor); |