From a6cd02fa4fbf778b453bdd809104cc31bd40fafa Mon Sep 17 00:00:00 2001 From: "dtownsend%oxymoronical.com" Date: Sun, 27 Jan 2008 23:41:00 +0000 Subject: [PATCH] Bug 414054: Add explicit message if preference isn't set for about:crashes. r=mano, ui-r=beltzner, a=schrep git-svn-id: svn://10.0.0.236/trunk@244166 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/toolkit/crashreporter/content/crashes.xhtml | 11 ++++++++++- .../toolkit/locales/en-US/crashreporter/crashes.dtd | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mozilla/toolkit/crashreporter/content/crashes.xhtml b/mozilla/toolkit/crashreporter/content/crashes.xhtml index 2cd3adf7684..aea31b1678b 100644 --- a/mozilla/toolkit/crashreporter/content/crashes.xhtml +++ b/mozilla/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/mozilla/toolkit/locales/en-US/crashreporter/crashes.dtd b/mozilla/toolkit/locales/en-US/crashreporter/crashes.dtd index ddc6bf664ef..23b0def9d41 100644 --- a/mozilla/toolkit/locales/en-US/crashreporter/crashes.dtd +++ b/mozilla/toolkit/locales/en-US/crashreporter/crashes.dtd @@ -2,4 +2,6 @@ +breakpad.reportURL must be set."> +