Bug 1201018 - Catch exception in PersistTabsRunnable; r=rnewman

This commit is contained in:
Geoff Brown 2015-12-03 09:10:46 -07:00
parent 16a744dd9f
commit 6dcf945cd4
2 changed files with 8 additions and 1 deletions

View File

@ -31,6 +31,7 @@ import android.accounts.OnAccountsUpdateListener;
import android.content.ContentResolver;
import android.content.Context;
import android.database.ContentObserver;
import android.database.sqlite.SQLiteException;
import android.graphics.Color;
import android.net.Uri;
import android.os.Handler;
@ -89,7 +90,11 @@ public class Tabs implements GeckoEventListener {
@Override
public void run() {
db.getTabsAccessor().persistLocalTabs(context.getContentResolver(), tabs);
try {
db.getTabsAccessor().persistLocalTabs(context.getContentResolver(), tabs);
} catch(SQLiteException e) {
Log.w(LOGTAG, "Error persisting local tabs", e);
}
}
};

View File

@ -251,6 +251,8 @@ public class testGeckoProfile extends PixelTest {
}
// Tries to remove a profile from Gecko profile. Verifies that it's removed from profiles.ini and its directory is deleted.
// TODO: Reconsider profile removal. Firefox would not normally remove a
// profile. Outstanding tasks may still try to access files in the profile.
private void removeProfile(GeckoProfile profile, boolean inProfilesIni) {
findInProfilesIni(profile, inProfilesIni);
File dir = profile.getDir();