Bug 861395 - Part 2: Still try to report exception if the exception reporter throws an exception. r=kats

This commit is contained in:
Chris Peterson 2013-04-12 14:17:37 -07:00
parent 748dfe1092
commit 2778c37412

View File

@ -181,18 +181,20 @@ public class GeckoAppShell
e = cause;
}
Log.e(LOGTAG, ">>> REPORTING UNCAUGHT EXCEPTION FROM THREAD "
+ thread.getId() + " (\"" + thread.getName() + "\")", e);
try {
Log.e(LOGTAG, ">>> REPORTING UNCAUGHT EXCEPTION FROM THREAD "
+ thread.getId() + " (\"" + thread.getName() + "\")", e);
if (e instanceof java.lang.OutOfMemoryError) {
SharedPreferences prefs =
GeckoApp.mAppContext.getSharedPreferences(GeckoApp.PREFS_NAME, 0);
SharedPreferences.Editor editor = prefs.edit();
editor.putBoolean(GeckoApp.PREFS_OOM_EXCEPTION, true);
editor.commit();
if (e instanceof OutOfMemoryError) {
SharedPreferences prefs =
GeckoApp.mAppContext.getSharedPreferences(GeckoApp.PREFS_NAME, 0);
SharedPreferences.Editor editor = prefs.edit();
editor.putBoolean(GeckoApp.PREFS_OOM_EXCEPTION, true);
editor.commit();
}
} finally {
reportJavaCrash(getStackTraceString(e));
}
reportJavaCrash(getStackTraceString(e));
}
});
}