Bug 1368797 - Don't render the about:support syscall log if it doesn't exist. r=gcp
authorJed Davis <jld@mozilla.com>
Tue, 30 May 2017 16:44:43 -0600
changeset 361931 e06f6065c2c306e350f3bc5a4bb4b3e4d761e052
parent 361930 e589f4df590bf79eef4417e3ecd89354ef717dbd
child 361932 13e2d926f0e613674d1fc90281a1c43e64616ffe
push id31952
push usercbook@mozilla.com
push dateFri, 02 Jun 2017 12:17:25 +0000
treeherdermozilla-central@194c009d6295 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcp
bugs1368797
milestone55.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 1368797 - Don't render the about:support syscall log if it doesn't exist. r=gcp This is a Linux-specific feature and other platforms don't have it (see also the conditional in Troubleshoot.jsm and the ifdef in aboutSupport.xhtml). MozReview-Commit-ID: IISzOvWXwCp
toolkit/content/aboutSupport.js
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -606,44 +606,46 @@ var snapshotFormatters = {
     let tbody = $("sandbox-tbody");
     for (let key in data) {
       // Simplify the display a little in the common case.
       if (key === "hasPrivilegedUserNamespaces" &&
           data[key] === data["hasUserNamespaces"]) {
         continue;
       }
       if (key === "syscallLog") {
-	// Not in this table.
-	continue;
+        // Not in this table.
+        continue;
       }
       tbody.appendChild($.new("tr", [
         $.new("th", strings.GetStringFromName(key), "column"),
         $.new("td", data[key]),
       ]));
     }
 
-    let syscallBody = $("sandbox-syscalls-tbody");
-    let argsHead = $("sandbox-syscalls-argshead");
-    for (let syscall of data.syscallLog) {
-      if (argsHead.colSpan < syscall.args.length) {
-	argsHead.colSpan = syscall.args.length;
+    if ("syscallLog" in data) {
+      let syscallBody = $("sandbox-syscalls-tbody");
+      let argsHead = $("sandbox-syscalls-argshead");
+      for (let syscall of data.syscallLog) {
+        if (argsHead.colSpan < syscall.args.length) {
+          argsHead.colSpan = syscall.args.length;
+        }
+        let cells = [
+          $.new("td", syscall.index, "integer"),
+          $.new("td", syscall.msecAgo / 1000),
+          $.new("td", syscall.pid, "integer"),
+          $.new("td", syscall.tid, "integer"),
+          $.new("td", strings.GetStringFromName("sandboxProcType." +
+                                                syscall.procType)),
+          $.new("td", syscall.syscall, "integer"),
+        ];
+        for (let arg of syscall.args) {
+          cells.push($.new("td", arg, "integer"));
+        }
+        syscallBody.appendChild($.new("tr", cells));
       }
-      let cells = [
-	$.new("td", syscall.index, "integer"),
-	$.new("td", syscall.msecAgo / 1000),
-	$.new("td", syscall.pid, "integer"),
-	$.new("td", syscall.tid, "integer"),
-	$.new("td", strings.GetStringFromName("sandboxProcType." +
-					      syscall.procType)),
-	$.new("td", syscall.syscall, "integer"),
-      ];
-      for (let arg of syscall.args) {
-	cells.push($.new("td", arg, "integer"));
-      }
-      syscallBody.appendChild($.new("tr", cells));
     }
   },
 };
 
 var $ = document.getElementById.bind(document);
 
 $.new = function $_new(tag, textContentOrChildren, className, attributes) {
   let elt = document.createElement(tag);