diff --git a/toolkit/components/places/src/nsFaviconService.cpp b/toolkit/components/places/src/nsFaviconService.cpp index 9f07aaf6f3f..003c5ad7f7e 100644 --- a/toolkit/components/places/src/nsFaviconService.cpp +++ b/toolkit/components/places/src/nsFaviconService.cpp @@ -389,6 +389,23 @@ nsFaviconService::SendFaviconNotifications(nsIURI* aPage, nsIURI* aFaviconURI) NS_IMETHODIMP nsFaviconService::SetAndLoadFaviconForPage(nsIURI* aPage, nsIURI* aFavicon, PRBool aForceReload) +{ +#ifdef LAZY_ADD + nsNavHistory* historyService = nsNavHistory::GetHistoryService(); + NS_ENSURE_TRUE(historyService, NS_ERROR_OUT_OF_MEMORY); + return historyService->AddLazyLoadFaviconMessage(aPage, aFavicon, + aForceReload); +#else + return DoSetAndLoadFaviconForPage(aPage, aFavicon, aForceReload); +#endif +} + + +// nsFaviconService::DoSetAndLoadFaviconForPage + +nsresult +nsFaviconService::DoSetAndLoadFaviconForPage(nsIURI* aPage, nsIURI* aFavicon, + PRBool aForceReload) { // check the failed favicon cache PRBool previouslyFailed;