From ec5c29c918d1f1d77f39b9efbe357bcc791f0f5b Mon Sep 17 00:00:00 2001 From: "dtownsend@oxymoronical.com" Date: Sun, 27 Jan 2008 15:41:00 -0800 Subject: [PATCH] Bug 414054: Add explicit message if preference isn't set for about:crashes. r=mano, ui-r=beltzner, a=schrep --- toolkit/crashreporter/content/crashes.xhtml | 11 ++++++++++- toolkit/locales/en-US/crashreporter/crashes.dtd | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/toolkit/crashreporter/content/crashes.xhtml b/toolkit/crashreporter/content/crashes.xhtml index 2cd3adf7684e..aea31b1678b4 100644 --- a/toolkit/crashreporter/content/crashes.xhtml +++ b/toolkit/crashreporter/content/crashes.xhtml @@ -84,7 +84,15 @@ function findInsertionPoint(reports, date) { function populateReportList() { var prefService = Cc["@mozilla.org/preferences-service;1"]. getService(Ci.nsIPrefBranch); - var reportURL = prefService.getCharPref("breakpad.reportURL"); + + try { + var reportURL = prefService.getCharPref("breakpad.reportURL"); + } + catch (e) { + document.getElementById("reportList").style.display = "none"; + document.getElementById("noConfig").style.display = "block"; + return; + } var directoryService = Cc["@mozilla.org/file/directory_service;1"]. getService(Ci.nsIProperties); @@ -202,5 +210,6 @@ function clearReports() { + diff --git a/toolkit/locales/en-US/crashreporter/crashes.dtd b/toolkit/locales/en-US/crashreporter/crashes.dtd index ddc6bf664efe..23b0def9d413 100644 --- a/toolkit/locales/en-US/crashreporter/crashes.dtd +++ b/toolkit/locales/en-US/crashreporter/crashes.dtd @@ -2,4 +2,6 @@ +breakpad.reportURL must be set."> +