Index: Source/devtools/front_end/timeline/MemoryCountersGraph.js |
diff --git a/Source/devtools/front_end/timeline/MemoryCountersGraph.js b/Source/devtools/front_end/timeline/MemoryCountersGraph.js |
index 6452dd907bca543952e628c86f80bfd2a02ebc8e..055733d2a58409ba3c5217f67e4ca34e0f161dc6 100644 |
--- a/Source/devtools/front_end/timeline/MemoryCountersGraph.js |
+++ b/Source/devtools/front_end/timeline/MemoryCountersGraph.js |
@@ -34,10 +34,12 @@ |
* @implements {WebInspector.TimelineModeView} |
* @param {!WebInspector.TimelineModeViewDelegate} delegate |
* @param {!WebInspector.TimelineModel} model |
+ * @param {!WebInspector.TimelineUIUtils} uiUtils |
*/ |
-WebInspector.MemoryCountersGraph = function(delegate, model) |
+WebInspector.MemoryCountersGraph = function(delegate, model, uiUtils) |
{ |
WebInspector.CountersGraph.call(this, WebInspector.UIString("MEMORY"), delegate, model); |
+ this._uiUtils = uiUtils; |
this._countersByName = {}; |
this._countersByName["jsHeapSizeUsed"] = this.createCounter(WebInspector.UIString("Used JS Heap"), WebInspector.UIString("JS Heap Size: %d"), "hsl(220, 90%, 43%)"); |
this._countersByName["documents"] = this.createCounter(WebInspector.UIString("Documents"), WebInspector.UIString("Documents: %d"), "hsl(0, 90%, 43%)"); |
@@ -69,7 +71,7 @@ WebInspector.MemoryCountersGraph.prototype = { |
*/ |
function addStatistics(record) |
{ |
- var counters = record.counters(); |
+ var counters = this._uiUtils.countersForRecord(record); |
if (!counters) |
return; |
for (var name in counters) { |