Backout 04545026b4ae (Bug 658305) due to increase in reftests shutdown crashes on Linux.
authorMarco Bonardo <mbonardo@mozilla.com>
Thu, 01 Sep 2011 14:33:15 +0200
changeset 76377 56bb9cbd6c26defa6a9f55dec9bd8509d9f0fdfd
parent 76376 d05513502cdc0ac1e6b8b9f27eb15fec34954e6e
child 76378 89c47cdfad0a20e111ccea68d1c492df4d2fc410
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
bugs658305
milestone9.0a1
backs out04545026b4ae067e8f2aeb7258ff1e09de458575
Backout 04545026b4ae (Bug 658305) due to increase in reftests shutdown crashes on Linux.
toolkit/components/places/Helpers.cpp
toolkit/components/places/nsNavHistory.cpp
--- a/toolkit/components/places/Helpers.cpp
+++ b/toolkit/components/places/Helpers.cpp
@@ -350,20 +350,19 @@ IsValidGUID(const nsCString& aGUID)
     return false;
   }
   return true;
 }
 
 void
 ForceWALCheckpoint(mozIStorageConnection* aDBConn)
 {
-  // Use a FULL checkpoint to ensure the operation is not dismissed by writers.
   nsCOMPtr<mozIStorageAsyncStatement> stmt;
   (void)aDBConn->CreateAsyncStatement(NS_LITERAL_CSTRING(
-    "pragma wal_checkpoint(FULL)"
+    "pragma wal_checkpoint "
   ), getter_AddRefs(stmt));
   nsCOMPtr<mozIStoragePendingStatement> handle;
   (void)stmt->ExecuteAsync(nsnull, getter_AddRefs(handle));
 }
 
 bool
 GetHiddenState(bool aIsRedirect,
                PRUint32 aTransitionType)
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -805,27 +805,17 @@ nsNavHistory::InitDB()
 
     // Set synchronous to FULL to ensure maximum data integrity, even in
     // case of crashes or unclean shutdowns.
     rv = mDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
         "PRAGMA synchronous = FULL"));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  // The journal is usually free to grow for performance reasons, but it never
-  // shrinks back.  Since the space taken may be problematic, especially on
-  // mobile devices, limit its size.
-  // Since exceeding the limit will cause a truncate, allow a slightly
-  // larger limit than DATABASE_MAX_WAL_SIZE_IN_KIBIBYTES to reduce the number
-  // of times it is needed.
-  nsCAutoString journalSizePragma("PRAGMA journal_size_limit = ");
-  journalSizePragma.AppendInt(DATABASE_MAX_WAL_SIZE_IN_KIBIBYTES * 3);
-  (void)mDBConn->ExecuteSimpleSQL(journalSizePragma);
-
-  // Grow places in 10MiB increments to limit fragmentation on disk.
+  // Grow places in 10MiB increments
   (void)mDBConn->SetGrowthIncrement(10 * BYTES_PER_MEBIBYTE, EmptyCString());
 
   // We use our functions during migration, so initialize them now.
   rv = InitFunctions();
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Get the database schema version.
   PRInt32 currentSchemaVersion;