Safeguard against infinite restarts of ngapps in the event that CheckForMismatches fails due to a bad Extensions.rdf file generated by a faulty nightly build.

This commit is contained in:
ben%bengoodger.com 2004-06-28 23:31:46 +00:00
parent 788530ba16
commit cd1e371148

View File

@ -1948,10 +1948,16 @@ int xre_main(int argc, char* argv[], const nsXREAppData* aAppData)
return 0;
}
char* noEMRestart = PR_GetEnv("NO_EM_RESTART");
char* noEMRestart = PR_GetEnv("NO_EM_RESTART");
noRestart = noEMRestart && !strcmp("1", noEMRestart);
if (!noRestart && upgraded)
em->CheckForMismatches(&needsRestart);
if (!noRestart && upgraded) {
rv = em->CheckForMismatches(&needsRestart);
NS_ASSERTION(NS_SUCCEEDED(rv), "Oops, looks like you have a extensions.rdf file generated by a buggy nightly build. Please remove it!");
if (NS_FAILED(rv)) {
needsRestart = PR_FALSE;
upgraded = PR_FALSE;
}
}
if (noRestart || (!upgraded || !needsRestart))
em->Start(componentsListChanged, &needsRestart);