mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Bug 1355492 - initialize ContentCrashHandlers.jsm after first paint, r=mconley.
This commit is contained in:
parent
47098f6c0e
commit
fc2fb801f0
@ -67,6 +67,7 @@ const startupPhases = {
|
||||
"resource:///modules/AboutNewTab.jsm",
|
||||
"resource:///modules/BrowserUITelemetry.jsm",
|
||||
"resource:///modules/BrowserUsageTelemetry.jsm",
|
||||
"resource:///modules/ContentCrashHandlers.jsm",
|
||||
"resource:///modules/DirectoryLinksProvider.jsm",
|
||||
"resource://gre/modules/NewTabUtils.jsm",
|
||||
"resource://gre/modules/PageThumbs.jsm",
|
||||
@ -93,6 +94,7 @@ const startupPhases = {
|
||||
"resource://gre/modules/BookmarkHTMLUtils.jsm",
|
||||
"resource://gre/modules/Bookmarks.jsm",
|
||||
"resource://gre/modules/ContextualIdentityService.jsm",
|
||||
"resource://gre/modules/CrashSubmit.jsm",
|
||||
"resource://gre/modules/FxAccounts.jsm",
|
||||
"resource://gre/modules/FxAccountsStorage.jsm",
|
||||
"resource://gre/modules/PlacesSyncUtils.jsm",
|
||||
|
@ -639,12 +639,6 @@ BrowserGlue.prototype = {
|
||||
});
|
||||
}
|
||||
|
||||
TabCrashHandler.init();
|
||||
if (AppConstants.MOZ_CRASHREPORTER) {
|
||||
PluginCrashReporter.init();
|
||||
UnsubmittedCrashHandler.init();
|
||||
}
|
||||
|
||||
Services.obs.notifyObservers(null, "browser-ui-startup-complete");
|
||||
},
|
||||
|
||||
@ -903,6 +897,11 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
TabCrashHandler.init();
|
||||
if (AppConstants.MOZ_CRASHREPORTER) {
|
||||
PluginCrashReporter.init();
|
||||
}
|
||||
|
||||
ProcessHangMonitor.init();
|
||||
|
||||
// A channel for "remote troubleshooting" code...
|
||||
@ -1170,6 +1169,13 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (AppConstants.MOZ_CRASHREPORTER) {
|
||||
UnsubmittedCrashHandler.init();
|
||||
Services.tm.idleDispatchToMainThread(function() {
|
||||
UnsubmittedCrashHandler.checkForUnsubmittedCrashReports();
|
||||
});
|
||||
}
|
||||
|
||||
// Let's load the contextual identities.
|
||||
Services.tm.idleDispatchToMainThread(() => {
|
||||
ContextualIdentityService.load();
|
||||
|
@ -577,7 +577,6 @@ this.UnsubmittedCrashHandler = {
|
||||
this.prefs.clearUserPref("suppressUntilDate");
|
||||
}
|
||||
|
||||
Services.obs.addObserver(this, "browser-delayed-startup-finished");
|
||||
Services.obs.addObserver(this, "profile-before-change");
|
||||
}
|
||||
},
|
||||
@ -604,26 +603,11 @@ this.UnsubmittedCrashHandler = {
|
||||
this.showingNotification = false;
|
||||
}
|
||||
|
||||
try {
|
||||
Services.obs.removeObserver(this, "browser-delayed-startup-finished");
|
||||
} catch (e) {
|
||||
// The browser-delayed-startup-finished observer might have already
|
||||
// fired and removed itself, so if this fails, it's okay.
|
||||
if (e.result != Cr.NS_ERROR_FAILURE) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
Services.obs.removeObserver(this, "profile-before-change");
|
||||
},
|
||||
|
||||
observe(subject, topic, data) {
|
||||
switch (topic) {
|
||||
case "browser-delayed-startup-finished": {
|
||||
Services.obs.removeObserver(this, topic);
|
||||
this.checkForUnsubmittedCrashReports();
|
||||
break;
|
||||
}
|
||||
case "profile-before-change": {
|
||||
this.uninit();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user