Bug 1427484 - Fix about:telemetry "Show raw stack data" button in Browser Hangs section. r=chutten
authorJeremy Lempereur <jeremy.lempereur@gmail.com>
Sun, 31 Dec 2017 17:22:51 +0100
changeset 397647 71b4e1ee7d99
parent 397646 886d3489da20
child 397648 b2de74e80df2
push id57482
push userchutten@mozilla.com
push dateWed, 03 Jan 2018 21:19:35 +0000
treeherderautoland@71b4e1ee7d99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1427484
milestone59.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 1427484 - Fix about:telemetry "Show raw stack data" button in Browser Hangs section. r=chutten The "Show raw stack data" button in the Browser Hangs section produced nothing but removing the "Browser Hangs" section from the about:telemetry navigation menu. I looked at the way the Late Writes section works and patched the Chrome Hangs render calls accordingly. MozReview-Commit-ID: Gq681oVrg90
toolkit/content/aboutTelemetry.js
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -1055,26 +1055,25 @@ function SymbolicationRequest_fetchSymbo
 
 var ChromeHangs = {
 
   symbolRequest: null,
 
   /**
    * Renders raw chrome hang data
    */
-  render: function ChromeHangs_render(payload) {
-    let hangs = payload.chromeHangs;
-    setHasData("chrome-hangs-section", !!hangs);
-    if (!hangs) {
+  render: function ChromeHangs_render(chromeHangs) {
+    setHasData("chrome-hangs-section", !!chromeHangs);
+    if (!chromeHangs) {
       return;
     }
 
-    let stacks = hangs.stacks;
-    let memoryMap = hangs.memoryMap;
-    let durations = hangs.durations;
+    let stacks = chromeHangs.stacks;
+    let memoryMap = chromeHangs.memoryMap;
+    let durations = chromeHangs.durations;
 
     StackRenderer.renderStacks("chrome-hangs", stacks, memoryMap,
                                (index) => this.renderHangHeader(index, durations));
   },
 
   renderHangHeader: function ChromeHangs_renderHangHeader(aIndex, aDurations) {
     StackRenderer.renderHeader("chrome-hangs", [aIndex + 1, aDurations[aIndex]]);
   }
@@ -2050,17 +2049,17 @@ function setupListeners() {
   });
 
   document.getElementById("chrome-hangs-hide-symbols").addEventListener("click",
     function() {
       if (!gPingData) {
         return;
       }
 
-      ChromeHangs.render(gPingData);
+      ChromeHangs.render(gPingData.payload.chromeHangs);
   });
 
   document.getElementById("captured-stacks-fetch-symbols").addEventListener("click",
     function() {
       if (!gPingData) {
         return;
       }
       let capturedStacks = gPingData.payload.processes.parent.capturedStacks;