From 8bb1e6d38d122eb6c701296073ad2a8b093167ef Mon Sep 17 00:00:00 2001 From: Dietrich Ayala Date: Wed, 29 Oct 2008 09:50:55 -0700 Subject: [PATCH] Bug 462050 - load the microsummary service after delayedStartup, w/ other non-essential services (r=myk) --- browser/base/content/browser.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 9c01b2836317..d92abdc7d280 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1207,14 +1207,6 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) { SetClickAndHoldHandlers(); #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. // 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. @@ -1270,11 +1262,22 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) { gPrefService.getBoolPref("browser.ctrlTab.mostRecentlyUsed")) 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. // Livemark updates don't need to start until after bookmark UI // such as the toolbar has initialized. Starting 5 seconds after - // delayedStartup in order to stagger this before the download - // manager starts (see below). + // delayedStartup in order to stagger this after the microsummary + // service (see above) and before the download manager starts (see below). setTimeout(function() PlacesUtils.livemarks.start(), 5000); // Initialize the download manager some time after the app starts so that