Bug 964511 - Delay Snippets.js initialization until after startup r=mfinkle

This commit is contained in:
James Willcox
2014-07-11 16:15:39 -05:00
parent 5e28328425
commit e79a5caabf
3 changed files with 6 additions and 4 deletions

View File

@@ -24,6 +24,7 @@
#include "nsIDOMWakeLockListener.h"
#include "nsIPowerManagerService.h"
#include "nsINetworkLinkService.h"
#include "nsCategoryManagerUtils.h"
#include "mozilla/Services.h"
#include "mozilla/unused.h"
@@ -182,6 +183,7 @@ nsAppShell::Init()
mozilla::services::GetObserverService();
if (obsServ) {
obsServ->AddObserver(this, "xpcom-shutdown", false);
obsServ->AddObserver(this, "browser-delayed-startup-finished", false);
}
if (sPowerManagerService)
@@ -207,6 +209,9 @@ nsAppShell::Observe(nsISupports* aSubject,
nsDependentString(aData).Equals(NS_LITERAL_STRING(PREFNAME_COALESCE_TOUCHES))) {
mAllowCoalescingTouches = Preferences::GetBool(PREFNAME_COALESCE_TOUCHES, true);
return NS_OK;
} else if (!strcmp(aTopic, "browser-delayed-startup-finished")) {
NS_CreateServicesFromCategory("browser-delayed-startup-finished", nullptr,
"browser-delayed-startup-finished");
}
return NS_OK;
}