Bug 838280 - Add function names and comments. r=froydnj.
authorRafael Ávila de Espíndola <respindola@mozilla.org>
Tue, 05 Feb 2013 17:04:05 -0500
changeset 130828 2e70586576b994df186990cd7f0ce52b1ef3d31e
parent 130827 53a09e22d0346a6a024b33e90578fcefbffb6fd6
child 130829 99d8346ef1af1fb08bea383edd7d37d52a89bbe2
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs838280
milestone21.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 838280 - Add function names and comments. r=froydnj.
toolkit/content/aboutTelemetry.js
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -289,17 +289,22 @@ let StackRenderer = {
 };
 
 function SymbolicationRequest(aPrefix, aRenderHeader, aMemoryMap, aStacks) {
   this.prefix = aPrefix;
   this.renderHeader = aRenderHeader;
   this.memoryMap = aMemoryMap;
   this.stacks = aStacks;
 }
-SymbolicationRequest.prototype.handleSymbolResponse = function() {
+/**
+ * A callback for onreadystatechange. It replaces the numeric stack with
+ * the symbolicated one returned by the symbolication server.
+ */
+SymbolicationRequest.prototype.handleSymbolResponse =
+function SymbolicationRequest_handleSymbolResponse() {
   if (this.symbolRequest.readyState != 4)
     return;
 
   let fetchElement = document.getElementById(this.prefix + "-fetch-symbols");
   fetchElement.classList.add("hidden");
   let hideElement = document.getElementById(this.prefix + "-hide-symbols");
   hideElement.classList.remove("hidden");
   let div = document.getElementById(this.prefix + "-data");
@@ -325,17 +330,21 @@ SymbolicationRequest.prototype.handleSym
 
     for (let symbol of stack) {
       div.appendChild(document.createTextNode(symbol));
       div.appendChild(document.createElement("br"));
     }
     div.appendChild(document.createElement("br"));
   }
 };
-SymbolicationRequest.prototype.fetchSymbols = function() {
+/**
+ * Send a request to the symbolication server to symbolicate this stack.
+ */
+SymbolicationRequest.prototype.fetchSymbols =
+function SymbolicationRequest_fetchSymbols() {
   let symbolServerURI =
     getPref(PREF_SYMBOL_SERVER_URI, DEFAULT_SYMBOL_SERVER_URI);
   let request = {"memoryMap" : this.memoryMap, "stacks" : this.stacks,
                  "version" : 3};
   let requestJSON = JSON.stringify(request);
 
   this.symbolRequest = XMLHttpRequest();
   this.symbolRequest.open("POST", symbolServerURI, true);