From 24fe5b3ab5d93a59404da583e37d1befe88b9a23 Mon Sep 17 00:00:00 2001 From: flyingrub Date: Fri, 26 May 2017 18:15:22 +0200 Subject: [PATCH] Bug 1363828 - First attempt at making about:telemetry more exception r=chutten safe We could also test ping.environment.addons before using it. MozReview-Commit-ID: 1z6NdLPTBqN --HG-- extra : rebase_source : c5ec4d189cf0d2d7bb67e335c06f678dd53d335d --- toolkit/content/aboutTelemetry.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/toolkit/content/aboutTelemetry.js b/toolkit/content/aboutTelemetry.js index a0d1e70f47aa..9416672a7342 100644 --- a/toolkit/content/aboutTelemetry.js +++ b/toolkit/content/aboutTelemetry.js @@ -107,7 +107,6 @@ function filterObject(obj, filterOut) { return ret; } - /** * This turns a JSON object into a "flat" stringified form, separated into top-level sections. * @@ -2084,6 +2083,14 @@ function displayPingData(ping, updatePayloadList = false) { let pre = document.getElementById("raw-ping-data"); pre.textContent = JSON.stringify(gPingData, null, 2); + try { + displayRichPingData(ping, updatePayloadList); + } catch (err) { + PingPicker._showRawPingData(); + } +} + +function displayRichPingData(ping, updatePayloadList) { // Update the structured data rendering. const keysHeader = bundle.GetStringFromName("keysHeader"); const valuesHeader = bundle.GetStringFromName("valuesHeader");