Bug 492797 - followup (r=marco)
authorDietrich Ayala <dietrich@mozilla.com>
Sun, 31 Jan 2010 19:11:33 -0800
changeset 37786 8544060edc73672cd1f5aa73b909a27e67b3f25b
parent 37785 33ea1ef0d0a329ce69d0f2bd85d4352ef67627a4
child 37787 1ffccd3864e12f75a10dff304f5ace1b16aa5090
push id11432
push userdietrich@mozilla.com
push dateMon, 01 Feb 2010 03:12:19 +0000
treeherdermozilla-central@8544060edc73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarco
bugs492797
milestone1.9.3a1pre
Bug 492797 - followup (r=marco)
toolkit/components/places/src/nsNavHistory.cpp
--- a/toolkit/components/places/src/nsNavHistory.cpp
+++ b/toolkit/components/places/src/nsNavHistory.cpp
@@ -5514,30 +5514,30 @@ nsNavHistory::FinalizeInternalStatements
 }
 
 // nsPIPlacesHistoryListenersNotifier ******************************************
 
 NS_IMETHODIMP
 nsNavHistory::NotifyOnPageExpired(nsIURI *aURI, PRTime aVisitTime,
                                   PRBool aWholeEntry)
 {
+  // Invalidate the cached value for whether there's history or not.
+  mHasHistoryEntries = -1;
+
   if (aWholeEntry) {
     // Notify our observers that the page has been removed.
     NOTIFY_OBSERVERS(mCanNotify, mCacheObservers, mObservers,
                      nsINavHistoryObserver, OnDeleteURI(aURI));
   }
   else {
     // Notify our observers that some visits for the page have been removed.
     NOTIFY_OBSERVERS(mCanNotify, mCacheObservers, mObservers,
                      nsINavHistoryObserver, OnDeleteVisits(aURI, aVisitTime));
   }
 
-  // Invalidate the cached value for whether there's history or not.
-  mHasHistoryEntries = -1;
-
   return NS_OK;
 }
 
 // nsIObserver *****************************************************************
 
 NS_IMETHODIMP
 nsNavHistory::Observe(nsISupports *aSubject, const char *aTopic,
                     const PRUnichar *aData)