Bug 824577 - about:telemetry addon section was not getting displayed. r=mak
authorVladan Djeric <vdjeric@mozilla.com>
Thu, 27 Dec 2012 12:28:33 -0500
changeset 117120 58edc998ee4f9de4bae86eeccec77ea5ef3ef95a
parent 117110 f9c5b23292cadd1b2c2c02c7e3c4a4a6ce566741
child 117121 6e5acaff8239634f6ccc30107768c87038e799f1
push id24087
push usergraememcc_firefox@graeme-online.co.uk
push dateSat, 29 Dec 2012 12:13:53 +0000
treeherdermozilla-central@b5ea211f23a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs824577
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 824577 - about:telemetry addon section was not getting displayed. r=mak
toolkit/content/aboutTelemetry.js
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -709,23 +709,27 @@ function onLoad() {
     for (let [name, hgram] of Iterator(histograms)) {
       Histogram.render(hgramDiv, name, hgram);
     }
   } else {
     showEmptySectionMessage("histograms-section");
   }
 
   // Show addon histogram data
-  histograms = Telemetry.addonHistogramSnapshots;
-  if (Object.keys(histograms).length) {
-    let addonDiv = document.getElementById("addon-histograms");
+  let addonDiv = document.getElementById("addon-histograms");
+  let addonHistogramsRendered = false;
+  let addonData = Telemetry.addonHistogramSnapshots;
+  for (let [addon, histograms] of Iterator(addonData)) {
     for (let [name, hgram] of Iterator(histograms)) {
-      Histogram.render(addonDiv, "ADDON_" + name, hgram);
+      addonHistogramsRendered = true;
+      Histogram.render(addonDiv, addon + ": " + name, hgram);
     }
-  } else {
+  }
+
+  if (!addonHistogramsRendered) {
     showEmptySectionMessage("addon-histograms-section");
   }
 
   // Get the Telemetry Ping payload
   Telemetry.asyncFetchTelemetryData(displayPingData);
 }
 
 function displayPingData() {