зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1401737 - 4. Moar diagnostic crash; r=me
Back out the part 1 diagnostic crash and introduce another diagnostic crash that will hopefully include more details. r=me for trivial patch. MozReview-Commit-ID: Ki8BTdTRHlM
This commit is contained in:
Родитель
7109022bac
Коммит
ab857cbf2e
|
@ -197,6 +197,8 @@ public class GeckoApplication extends Application
|
|||
mInBackground = false;
|
||||
}
|
||||
|
||||
private static Application sApp;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
Log.i(LOG_TAG, "zerdatime " + SystemClock.elapsedRealtime() +
|
||||
|
@ -277,6 +279,15 @@ public class GeckoApplication extends Application
|
|||
|
||||
MulticastDNSManager.getInstance(context).init();
|
||||
|
||||
if (sApp == null) {
|
||||
sApp = this;
|
||||
} else {
|
||||
GeckoAppShell.appendAppNotesToCrashReport("Bug 1401737: " +
|
||||
this + '/' + getPackageName() + '/' + getApplicationInfo().uid + ' ' +
|
||||
sApp + '/' + sApp.getPackageName() + '/' + sApp.getApplicationInfo().uid);
|
||||
throw new IllegalStateException("Bug 1401737 diagnostic crash 2");
|
||||
}
|
||||
|
||||
GeckoService.register();
|
||||
|
||||
IntentHelper.init();
|
||||
|
|
|
@ -71,22 +71,10 @@ public class GeckoService extends Service {
|
|||
|
||||
private static final EventListener EVENT_LISTENER = new EventListener();
|
||||
|
||||
private static RuntimeException bug1401737Diag;
|
||||
|
||||
public static void register() {
|
||||
if (DEBUG) {
|
||||
Log.d(LOGTAG, "Registered listener");
|
||||
}
|
||||
|
||||
// Diagnose bug 1401737. register() is unexpectedly getting called a second time.
|
||||
// We know the stack for the second call, but we want to collect stack for the first call.
|
||||
if (bug1401737Diag == null) {
|
||||
bug1401737Diag = new IllegalStateException("Bug 1401737 diagnostic crash");
|
||||
} else {
|
||||
Log.e(LOGTAG, "register() is called a second time", new Exception());
|
||||
throw bug1401737Diag;
|
||||
}
|
||||
|
||||
EventDispatcher.getInstance().registerGeckoThreadListener(EVENT_LISTENER,
|
||||
"Gecko:ScheduleRun");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче