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

This commit is contained in:
gavin@gavinsharp.com 2007-07-28 19:47:40 -07:00
Родитель 93258eb195
Коммит 48ceb42878
1 изменённых файлов: 6 добавлений и 2 удалений

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

@ -1097,7 +1097,11 @@ function delayedStartup()
// Initialize the microsummary service by retrieving it, prompting its factory // Initialize the microsummary service by retrieving it, prompting its factory
// to create its singleton, whose constructor initializes the service. // 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. // Initialize the content pref event sink and the text zoom setting.
// We do this before the session restore service gets initialized so we can // We do this before the session restore service gets initialized so we can
@ -1107,7 +1111,7 @@ function delayedStartup()
TextZoom.init(); TextZoom.init();
} }
catch(ex) { 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) // initialize the session-restore service (in case it's not already running)