diff --git a/mozilla/toolkit/components/places/src/nsNavHistoryExpire.cpp b/mozilla/toolkit/components/places/src/nsNavHistoryExpire.cpp index a243fbf695f..1cf0f3bd23d 100644 --- a/mozilla/toolkit/components/places/src/nsNavHistoryExpire.cpp +++ b/mozilla/toolkit/components/places/src/nsNavHistoryExpire.cpp @@ -245,6 +245,8 @@ nsNavHistoryExpire::ClearHistory() mozIStorageConnection* connection = mHistory->GetStorageConnection(); NS_ENSURE_TRUE(connection, NS_ERROR_OUT_OF_MEMORY); + mozStorageTransaction transaction(connection, PR_FALSE); + // reset frecency for all items that will _not_ be deleted // Note, we set frecency to -visit_count since we use that value in our // idle query to figure out which places to recalcuate frecency first. @@ -290,6 +292,9 @@ nsNavHistoryExpire::ClearHistory() if (NS_FAILED(rv)) NS_WARNING("failed to fix invalid frecencies"); + rv = transaction.Commit(); + NS_ENSURE_SUCCESS(rv, rv); + // XXX todo // forcibly call the "on idle" timer here to do a little work // but the rest will happen on idle.