mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 511207 - last page not removed from history upon close of browser, r=sdwilsh
This commit is contained in:
parent
752031a4ab
commit
565378112a
@ -4313,7 +4313,8 @@ nsNavHistory::GetCount(PRUint32 *aCount)
|
||||
// nsNavHistory::RemovePagesInternal
|
||||
//
|
||||
// Deletes a list of placeIds from history.
|
||||
// This is an internal method used by RemovePages and RemovePagesFromHost.
|
||||
// This is an internal method used by RemovePages, RemovePagesFromHost and
|
||||
// RemovePagesByTimeframe.
|
||||
// Takes a comma separated list of place ids.
|
||||
// This method does not do any observer notification.
|
||||
|
||||
@ -4460,6 +4461,11 @@ nsNavHistory::RemovePages(nsIURI **aURIs, PRUint32 aLength, PRBool aDoBatchNotif
|
||||
NS_ASSERTION(NS_IsMainThread(), "This can only be called on the main thread");
|
||||
NS_ENSURE_ARG(aURIs);
|
||||
|
||||
#ifdef LAZY_ADD
|
||||
// We must ensure to remove pages from the lazy messages queue too.
|
||||
CommitLazyMessages();
|
||||
#endif
|
||||
|
||||
nsresult rv;
|
||||
// build a list of place ids to delete
|
||||
nsCString deletePlaceIdsQueryString;
|
||||
@ -4529,6 +4535,11 @@ nsNavHistory::RemovePagesFromHost(const nsACString& aHost, PRBool aEntireDomain)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "This can only be called on the main thread");
|
||||
|
||||
#ifdef LAZY_ADD
|
||||
// We must ensure to remove pages from the lazy messages queue too.
|
||||
CommitLazyMessages();
|
||||
#endif
|
||||
|
||||
nsresult rv;
|
||||
// Local files don't have any host name. We don't want to delete all files in
|
||||
// history when we get passed an empty string, so force to exact match
|
||||
@ -4617,6 +4628,11 @@ nsNavHistory::RemovePagesByTimeframe(PRTime aBeginTime, PRTime aEndTime)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "This can only be called on the main thread");
|
||||
|
||||
#ifdef LAZY_ADD
|
||||
// We must ensure to remove pages from the lazy messages queue too.
|
||||
CommitLazyMessages();
|
||||
#endif
|
||||
|
||||
nsresult rv;
|
||||
// build a list of place ids to delete
|
||||
nsCString deletePlaceIdsQueryString;
|
||||
@ -4688,6 +4704,11 @@ nsNavHistory::RemoveVisitsByTimeframe(PRTime aBeginTime, PRTime aEndTime)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "This can only be called on the main thread");
|
||||
|
||||
#ifdef LAZY_ADD
|
||||
// We must ensure to remove pages from the lazy messages queue too.
|
||||
CommitLazyMessages();
|
||||
#endif
|
||||
|
||||
nsresult rv;
|
||||
|
||||
// Build a list of place IDs whose visits fall entirely within the timespan.
|
||||
@ -4775,6 +4796,11 @@ nsNavHistory::RemoveAllPages()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "This can only be called on the main thread");
|
||||
|
||||
#ifdef LAZY_ADD
|
||||
// We must ensure to remove pages from the lazy messages queue too.
|
||||
CommitLazyMessages();
|
||||
#endif
|
||||
|
||||
// expire everything
|
||||
mExpire.ClearHistory();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user