Bug 731613 - Don't track startup crashes when XRE_PROFILE_PATH is set (from restart or profile manager). r=Mossop

--HG--
extra : rebase_source : c16c158eeec49521f60b1afdfa32a64e9dbda2c7
This commit is contained in:
Matthew Noorenberghe 2012-03-14 17:08:59 -07:00
Родитель 973b7ff046
Коммит cebc9c00e5
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -872,6 +872,15 @@ nsAppStartup::TrackStartupCrashBegin(bool *aIsSafeModeNecessary)
Preferences::GetInt(kPrefRecentCrashes, &recentCrashes);
mIsSafeModeNecessary = (recentCrashes > maxResumedCrashes && maxResumedCrashes != -1);
// Bug 731613 - Don't check if the last startup was a crash if XRE_PROFILE_PATH is set. After
// profile manager, the profile lock's mod. time has been changed so can't be used on this startup.
// After a restart, it's safe to assume the last startup was successful.
char *xreProfilePath = PR_GetEnv("XRE_PROFILE_PATH");
if (xreProfilePath) {
GetAutomaticSafeModeNecessary(aIsSafeModeNecessary);
return NS_ERROR_NOT_AVAILABLE;
}
// time of last successful startup
PRInt32 lastSuccessfulStartup;
rv = Preferences::GetInt(kPrefLastSuccess, &lastSuccessfulStartup);