From d6ea87875eabfff8c1b68e55e018a0eda321dbc7 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Sun, 29 Jul 2007 02:47:40 +0000 Subject: [PATCH] Bug 389948: catch microsummary service initialization exceptions so that they don't disrupt startup (e.g. breaking session restore), r=mconnor, a=mconnor on IRC Firefox 3 M7 --- browser/base/content/browser.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 77938179998..59e33ed1a9d 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1097,7 +1097,11 @@ function delayedStartup() // Initialize the microsummary service by retrieving it, prompting its factory // to create its singleton, whose constructor initializes the service. - Cc["@mozilla.org/microsummary/service;1"].getService(Ci.nsIMicrosummaryService); + try { + Cc["@mozilla.org/microsummary/service;1"].getService(Ci.nsIMicrosummaryService); + } catch (ex) { + Components.utils.reportError("Failed to init microsummary service:\n" + ex); + } // Initialize the content pref event sink and the text zoom setting. // We do this before the session restore service gets initialized so we can @@ -1107,7 +1111,7 @@ function delayedStartup() TextZoom.init(); } catch(ex) { - Components.utils.reportError(ex); + Components.utils.reportError("Failed to init content pref service:\n" + ex); } // initialize the session-restore service (in case it's not already running)