Bug 470586 - Crash calling removePagesFromHost when sidebar is showing pages grouped by day and site, r=sdwilsh a=beltzner
authorNeil Rashbrook <neil@httl.net>
Wed, 01 Apr 2009 15:26:59 +0200
changeset 24194 aeb04030bf2f
parent 24193 af6b2f391d8a
child 24195 d9ab6cbb6474
push id1069
push usermak77@bonardo.net
push dateWed, 01 Apr 2009 13:28:44 +0000
reviewerssdwilsh, beltzner
bugs470586
milestone1.9.1b4pre
Bug 470586 - Crash calling removePagesFromHost when sidebar is showing pages grouped by day and site, r=sdwilsh a=beltzner
toolkit/components/places/src/nsNavHistory.cpp
--- a/toolkit/components/places/src/nsNavHistory.cpp
+++ b/toolkit/components/places/src/nsNavHistory.cpp
@@ -4517,22 +4517,22 @@ nsNavHistory::RemovePagesFromHost(const 
     if (!hostPlaceIds.IsEmpty())
       hostPlaceIds.AppendLiteral(",");
     PRInt64 placeId;
     rv = statement->GetInt64(0, &placeId);
     NS_ENSURE_SUCCESS(rv, rv);
     hostPlaceIds.AppendInt(placeId);
   }
 
-  rv = RemovePagesInternal(hostPlaceIds);
-  NS_ENSURE_SUCCESS(rv, rv);
-
   // force a full refresh calling onEndUpdateBatch (will call Refresh())
   UpdateBatchScoper batch(*this); // sends Begin/EndUpdateBatch to observers
 
+  rv = RemovePagesInternal(hostPlaceIds);
+  NS_ENSURE_SUCCESS(rv, rv);
+
   return NS_OK;
 }
 
 
 // nsNavHistory::RemovePagesByTimeframe
 //
 //    This function will delete all history information about
 //    pages for a given timeframe.