зеркало из https://github.com/mozilla/gecko-dev.git
Bug 328598 r=vladimir Rollback 0-fill deleted DB entries and vacuum on
explicit clear to improve shutdown times.
This commit is contained in:
Родитель
2dd271a96d
Коммит
1776867707
|
@ -2348,10 +2348,18 @@ nsNavHistory::RemovePagesFromHost(const nsACString& aHost, PRBool aEntireDomain)
|
|||
NS_IMETHODIMP
|
||||
nsNavHistory::RemoveAllPages()
|
||||
{
|
||||
// expire everything, compress DB (compression is slow, but since the user
|
||||
// requested it, they either want the disk space or to cover their tracks).
|
||||
// expire everything
|
||||
VacuumDB(0);
|
||||
|
||||
// compress DB (compression is slow, but since the user requested it, they
|
||||
// either want the disk space or to cover their tracks). The dummy statement
|
||||
// must be stopped because vacuuming will change everything and invalidate
|
||||
// the cache.
|
||||
StopDummyStatement();
|
||||
nsresult rv = mDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING("VACUUM"));
|
||||
StartDummyStatement();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// notify observers
|
||||
ENUMERATE_WEAKARRAY(mObservers, nsINavHistoryObserver, OnClearHistory())
|
||||
|
||||
|
|
|
@ -96,9 +96,12 @@ CSRCS = \
|
|||
$(NULL)
|
||||
|
||||
# REFEF_IO allows us to override IO functions, which is used in the AsyncIO
|
||||
# storage system. SECURE_DELETE will cause SQLITE to 0-fill delete data so we
|
||||
DEFINES = -DSQLITE_ENABLE_REDEF_IO -DTHREADSAFE=1
|
||||
|
||||
# -DSQLITE_SECURE_DELETE=1 will cause SQLITE to 0-fill delete data so we
|
||||
# don't have to vacuum to make sure the data is not visible in the file.
|
||||
DEFINES = -DSQLITE_ENABLE_REDEF_IO -DSQLITE_SECURE_DELETE=1
|
||||
# Currently, this is removed because it slows down browser shutdown (as we
|
||||
# 0-fill all history entries that are expiring).
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
##LIBS = $(DIST)/lib/$(LIB_PREFIX)sqlite3_s.$(LIB_SUFFIX)
|
||||
|
|
Загрузка…
Ссылка в новой задаче