Bug 462050 - load the microsummary service after delayedStartup, w/ other non-essential services (r=myk)

This commit is contained in:
Dietrich Ayala 2008-10-29 09:50:55 -07:00
Родитель a2ce44f7b7
Коммит 8bb1e6d38d
1 изменённых файлов: 13 добавлений и 10 удалений

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

@ -1207,14 +1207,6 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
SetClickAndHoldHandlers(); SetClickAndHoldHandlers();
#endif #endif
// Initialize the microsummary service by retrieving it, prompting its factory
// to create its singleton, whose constructor initializes the service.
try {
Cc["@mozilla.org/microsummary/service;1"].getService(Ci.nsIMicrosummaryService);
} catch (ex) {
Components.utils.reportError("Failed to init microsummary service:\n" + ex);
}
// Initialize the full zoom setting. // Initialize the full 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
// apply full zoom settings to tabs restored by the session restore service. // apply full zoom settings to tabs restored by the session restore service.
@ -1270,11 +1262,22 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
gPrefService.getBoolPref("browser.ctrlTab.mostRecentlyUsed")) gPrefService.getBoolPref("browser.ctrlTab.mostRecentlyUsed"))
ctrlTab.init(); ctrlTab.init();
// Initialize the microsummary service by retrieving it, prompting its factory
// to create its singleton, whose constructor initializes the service.
// Started 4 seconds after delayedStartup (before the livemarks service below).
setTimeout(function() {
try {
Cc["@mozilla.org/microsummary/service;1"].getService(Ci.nsIMicrosummaryService);
} catch (ex) {
Components.utils.reportError("Failed to init microsummary service:\n" + ex);
}
}, 4000);
// Delayed initialization of the livemarks update timer. // Delayed initialization of the livemarks update timer.
// Livemark updates don't need to start until after bookmark UI // Livemark updates don't need to start until after bookmark UI
// such as the toolbar has initialized. Starting 5 seconds after // such as the toolbar has initialized. Starting 5 seconds after
// delayedStartup in order to stagger this before the download // delayedStartup in order to stagger this after the microsummary
// manager starts (see below). // service (see above) and before the download manager starts (see below).
setTimeout(function() PlacesUtils.livemarks.start(), 5000); setTimeout(function() PlacesUtils.livemarks.start(), 5000);
// Initialize the download manager some time after the app starts so that // Initialize the download manager some time after the app starts so that