зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1388145 - Move startup crashes tracking to nsBrowserGlue as it should only run once, and not per-window. r=florian
MozReview-Commit-ID: KR1bv1TJGVf --HG-- extra : rebase_source : 0d6d7778acf515fdbf2fe86e926bc30d84b47514
This commit is contained in:
Родитель
5130c05413
Коммит
2e035ad163
|
@ -1675,15 +1675,6 @@ var gBrowserInit = {
|
|||
gNavToolbox.addEventListener("customizationstarting", CustomizationHandler);
|
||||
gNavToolbox.addEventListener("customizationending", CustomizationHandler);
|
||||
|
||||
// End startup crash tracking after a delay to catch crashes while restoring
|
||||
// tabs and to postpone saving the pref to disk.
|
||||
try {
|
||||
const startupCrashEndDelay = 30 * 1000;
|
||||
setTimeout(Services.startup.trackStartupCrashEnd, startupCrashEndDelay);
|
||||
} catch (ex) {
|
||||
Cu.reportError("Could not end startup crash tracking: " + ex);
|
||||
}
|
||||
|
||||
SessionStore.promiseInitialized.then(() => {
|
||||
// Bail out if the window has been closed in the meantime.
|
||||
if (window.closed) {
|
||||
|
|
|
@ -236,6 +236,8 @@ const BOOKMARKS_BACKUP_MIN_INTERVAL_DAYS = 1;
|
|||
const BOOKMARKS_BACKUP_MAX_INTERVAL_DAYS = 3;
|
||||
// Seconds of idle time before the late idle tasks will be scheduled.
|
||||
const LATE_TASKS_IDLE_TIME_SEC = 20;
|
||||
// Time after we stop tracking startup crashes.
|
||||
const STARTUP_CRASHES_END_DELAY_MS = 30 * 1000;
|
||||
|
||||
// Factory object
|
||||
const BrowserGlueServiceFactory = {
|
||||
|
@ -1164,6 +1166,13 @@ BrowserGlue.prototype = {
|
|||
Services.tm.idleDispatchToMainThread(() => {
|
||||
this._checkForDefaultBrowser();
|
||||
});
|
||||
|
||||
Services.tm.idleDispatchToMainThread(() => {
|
||||
let {setTimeout} = Cu.import("resource://gre/modules/Timer.jsm", {});
|
||||
setTimeout(function() {
|
||||
Services.tm.idleDispatchToMainThread(Services.startup.trackStartupCrashEnd);
|
||||
}, STARTUP_CRASHES_END_DELAY_MS);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче