Bug 1303380 - Wrap the telemetry code in _firstWindowLoaded with a try/catch to allow startup and migration code to run to completion if there is an exception writing to Telemetry. r?gijs
MozReview-Commit-ID: DPfq6lZ4fM3
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -926,17 +926,19 @@ BrowserGlue.prototype = {
SCALING_PROBE_NAME = "DISPLAY_SCALING_OSX";
break;
case "linux":
SCALING_PROBE_NAME = "DISPLAY_SCALING_LINUX";
break;
}
if (SCALING_PROBE_NAME) {
let scaling = aWindow.devicePixelRatio * 100;
- Services.telemetry.getHistogramById(SCALING_PROBE_NAME).add(scaling);
+ try {
+ Services.telemetry.getHistogramById(SCALING_PROBE_NAME).add(scaling);
+ } catch (ex) {}
}
},
// the first browser window has finished initializing
_onFirstWindowLoaded: function BG__onFirstWindowLoaded(aWindow) {
// Initialize PdfJs when running in-process and remote. This only
// happens once since PdfJs registers global hooks. If the PdfJs
// extension is installed the init method below will be overridden