Bug 1275089 - Wrap the call to getHistogramById().add() in a try/catch since the probe expires in v50 and the histogram is no longer reported as a COUNT histogram since it is expired. Histograms that are not COUNT histograms must supply a value when calling .add(). r?gijs draft
authorJared Wein <jwein@mozilla.com>
Fri, 27 May 2016 13:43:19 -0400
changeset 372179 c3b26f5e5fefd03f69a404521b7d739fec1ad275
parent 371311 25566a14a7ac98674bfe9b6e73edc59fcc286c22
child 522119 3f4543a62509955ed3b9166dd4253a72f3d4ea8a
push id19461
push userjwein@mozilla.com
push dateFri, 27 May 2016 17:43:42 +0000
reviewersgijs
bugs1275089
milestone49.0a1
Bug 1275089 - Wrap the call to getHistogramById().add() in a try/catch since the probe expires in v50 and the histogram is no longer reported as a COUNT histogram since it is expired. Histograms that are not COUNT histograms must supply a value when calling .add(). r?gijs MozReview-Commit-ID: C4x6dR1nULR
browser/components/preferences/in-content/content.js
--- a/browser/components/preferences/in-content/content.js
+++ b/browser/components/preferences/in-content/content.js
@@ -128,18 +128,20 @@ var gContentPane = {
     let bundlePreferences = document.getElementById("bundlePreferences");
     let params = { permissionType: "desktop-notification" };
     params.windowTitle = bundlePreferences.getString("notificationspermissionstitle");
     params.introText = bundlePreferences.getString("notificationspermissionstext4");
 
     gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
                     "resizable=yes", params);
 
-    Services.telemetry
-            .getHistogramById("WEB_NOTIFICATION_EXCEPTIONS_OPENED").add();
+    try {
+      Services.telemetry
+              .getHistogramById("WEB_NOTIFICATION_EXCEPTIONS_OPENED").add();
+    } catch (e) {}
   },
 
 
   // POP-UPS
 
   /**
    * Displays the popup exceptions dialog where specific site popup preferences
    * can be set.