mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 05:47:04 +00:00
Bug 837379 - Log main thread stack for off-main-thread exceptions; r=cpeterson
This commit is contained in:
parent
bf09512675
commit
d7a68d8aaa
@ -195,6 +195,14 @@ public class GeckoAppShell
|
||||
Log.e(LOGTAG, ">>> REPORTING UNCAUGHT EXCEPTION FROM THREAD "
|
||||
+ thread.getId() + " (\"" + thread.getName() + "\")", e);
|
||||
|
||||
Thread mainThread = ThreadUtils.getUiThread();
|
||||
if (mainThread != null && thread != mainThread) {
|
||||
Log.e(LOGTAG, "Main thread stack:");
|
||||
for (StackTraceElement ste : mainThread.getStackTrace()) {
|
||||
Log.e(LOGTAG, ste.toString());
|
||||
}
|
||||
}
|
||||
|
||||
if (e instanceof OutOfMemoryError) {
|
||||
SharedPreferences prefs =
|
||||
getContext().getSharedPreferences(GeckoApp.PREFS_NAME, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user