Bug 754453 - BrowserProvider insert failures are silent. r=blassey
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Mon, 14 May 2012 12:22:10 +0200
changeset 93866 32209138048c13b1b9767f908ead9d024c5ce275
parent 93865 ec19a7304528ca32a7eeb2c7fff2da3ab2d4697e
child 93867 a8bdf03151307b5e0c00fe7e18ffbb3d79a4525e
push id9358
push usergpascutto@mozilla.com
push dateMon, 14 May 2012 10:22:29 +0000
treeherdermozilla-inbound@32209138048c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs754453
milestone15.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 754453 - BrowserProvider insert failures are silent. r=blassey
mobile/android/base/db/BrowserProvider.java.in
--- a/mobile/android/base/db/BrowserProvider.java.in
+++ b/mobile/android/base/db/BrowserProvider.java.in
@@ -2151,16 +2151,23 @@ public class BrowserProvider extends Con
                 // isn't IGNORE). We still need to set it as successful to let
                 // everything before the failed op go through.
                 // We can't set conflict resolution on API level < 8, and even
                 // above 8 it requires splitting the call per operation
                 // (insert/update/delete).
                 db.setTransactionSuccessful();
                 db.endTransaction();
                 db.beginTransaction();
+            } catch (OperationApplicationException e) {
+                // Repeat of above.
+                results[i] = new ContentProviderResult(0);
+                failures = true;
+                db.setTransactionSuccessful();
+                db.endTransaction();
+                db.beginTransaction();
             }
         }
 
         trace("Flushing DB applyBatch...");
         db.setTransactionSuccessful();
         db.endTransaction();
 
         if (failures) {