Bug 1168166 - Ignore failed IndexedDB optimization if disk is too full, r=janv.
authorBen Turner <bent.mozilla@gmail.com>
Mon, 08 Jun 2015 11:11:18 -0700
changeset 247690 ab4fcd2c9ca6c7d2b4cb82109a0ce94fb3cef859
parent 247689 51e393cd5b5a1e3fa0f8007a50161fcc1a1f2a2d
child 247691 03ff333d49c037b4b15dbf501f177491b8e2fc0b
push id28881
push userkwierso@gmail.com
push dateWed, 10 Jun 2015 01:59:03 +0000
treeherdermozilla-central@d9156ad9b7a2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanv
bugs1168166
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1168166 - Ignore failed IndexedDB optimization if disk is too full, r=janv.
dom/indexedDB/ActorsParent.cpp
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -3635,19 +3635,21 @@ SetDefaultPragmas(mozIStorageConnection*
 
   rv = aConnection->ExecuteSimpleSQL(pragmaStmt);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
 #ifndef IDB_MOBILE
   if (kSQLiteGrowthIncrement) {
+    // This is just an optimization so ignore the failure if the disk is
+    // currently too full.
     rv = aConnection->SetGrowthIncrement(kSQLiteGrowthIncrement,
                                          EmptyCString());
-    if (NS_WARN_IF(NS_FAILED(rv))) {
+    if (rv != NS_ERROR_FILE_TOO_BIG && NS_WARN_IF(NS_FAILED(rv))) {
       return rv;
     }
   }
 #endif // IDB_MOBILE
 
   return NS_OK;
 }