зеркало из https://github.com/mozilla/gecko-dev.git
Bug 837379 - Log main thread stack for off-main-thread exceptions; r=cpeterson
This commit is contained in:
Родитель
bf09512675
Коммит
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче