fix for bug #407373: if ExpireItems() fails, don't fire the timer again. r=dietrich, a=schrep for m10
authorsspitzer@mozilla.org
Fri, 07 Dec 2007 13:22:20 -0800
changeset 8816 2685a86b911a280fac7530719db2a1939aed67ed
parent 8815 ec48f449e370383f1e419bac58b90d4dd36a4d31
child 8817 4098ae5668451ef9c581ea6b9c4211d260faec77
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherderautoland@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdietrich, schrep
bugs407373
milestone1.9b2pre
fix for bug #407373: if ExpireItems() fails, don't fire the timer again. r=dietrich, a=schrep for m10
toolkit/components/places/src/nsNavHistoryExpire.cpp
--- a/toolkit/components/places/src/nsNavHistoryExpire.cpp
+++ b/toolkit/components/places/src/nsNavHistoryExpire.cpp
@@ -285,18 +285,17 @@ nsNavHistoryExpire::OnExpirationChanged(
 nsresult
 nsNavHistoryExpire::DoPartialExpiration()
 {
   // expire history items
   PRBool keepGoing;
   nsresult rv = ExpireItems(EXPIRATION_COUNT_PER_RUN, &keepGoing);
   if (NS_FAILED(rv))
     NS_WARNING("ExpireItems failed.");
-
-  if (keepGoing)
+  else if (keepGoing)
     StartTimer(SUBSEQUENT_EXPIRATION_TIMEOUT);
   return NS_OK;
 }
 
 
 // nsNavHistoryExpire::ExpireItems
 //
 //    Here, we try to expire aNumToExpire items and their associated data,