Bug 425230: add a transaction to ClearHistory, patch by Marco Bonardo <mak77@supereva.it>, r=dietrich, a=mconnor
git-svn-id: svn://10.0.0.236/trunk@250861 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
0668094f55
commit
2dac5243b1
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user