Bug 329816 r=bryner Make time-critical history operations lazy to improve PLT.

Original committer: brettw%gmail.com
Original revision: 1.7
Original date: 2006/03/29 17:46:58
This commit is contained in:
benjamin%smedbergs.us 2006-07-18 15:53:35 +00:00
Родитель acf82e1d40
Коммит c0df067a2f
1 изменённых файлов: 17 добавлений и 0 удалений

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

@ -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;