Bug 1004665 - If the crash reporter is disabled, .annotateCrashReport will throw an exception. Catch it and continue, r=gfritzsche

--HG--
extra : rebase_source : 5a86f06dbca38f9f2d692aeb651789e452b96bc9
This commit is contained in:
Benjamin Smedberg 2014-05-05 10:31:26 -04:00
Родитель f0e2260c0b
Коммит b5e445e96d
2 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -1165,7 +1165,11 @@ Experiments.Experiments.prototype = {
}
if ("@mozilla.org/toolkit/crash-reporter;1" in Cc && activeExperiment) {
gCrashReporter.annotateCrashReport("ActiveExperiment", activeExperiment.id);
try {
gCrashReporter.annotateCrashReport("ActiveExperiment", activeExperiment.id);
} catch (e) {
// It's ok if crash reporting is disabled.
}
}
},

Просмотреть файл

@ -13,6 +13,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
"resource://gre/modules/PluralForm.jsm");
window.addEventListener("load", function onload(event) {
try {
window.removeEventListener("load", onload, false);
Troubleshoot.snapshot(function (snapshot) {
for (let prop in snapshotFormatters)
@ -20,6 +21,9 @@ window.addEventListener("load", function onload(event) {
});
populateResetBox();
setupEventListeners();
} catch (e) {
Cu.reportError("stack of load error for about:support: " + e + ": " + e.stack);
}
}, false);
// Each property in this object corresponds to a property in Troubleshoot.jsm's