Bug 599062 - issuing make does not invalidate fastload/startupcache in opt builds r=bsmedberg a=bsmedberg

This commit is contained in:
Benedict Hsieh 2010-09-23 13:41:26 -07:00
Родитель c0ca8757a6
Коммит 6ed0382f83
1 изменённых файлов: 3 добавлений и 6 удалений

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

@ -2397,14 +2397,12 @@ CheckCompatibility(nsIFile* aProfileDir, const nsCString& aVersion,
rv = parser.GetString("Compatibility", "InvalidateCaches", buf); rv = parser.GetString("Compatibility", "InvalidateCaches", buf);
*aCachesOK = (NS_FAILED(rv) || !buf.EqualsLiteral("1")); *aCachesOK = (NS_FAILED(rv) || !buf.EqualsLiteral("1"));
#ifdef DEBUG
PRBool purgeCaches = PR_FALSE; PRBool purgeCaches = PR_FALSE;
if (aFlagFile) { if (aFlagFile) {
aFlagFile->Exists(&purgeCaches); aFlagFile->Exists(&purgeCaches);
} }
*aCachesOK = !purgeCaches && *aCachesOK; *aCachesOK = !purgeCaches && *aCachesOK;
#endif
return PR_TRUE; return PR_TRUE;
} }
@ -3356,7 +3354,7 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
// Re-register components to catch potential changes. // Re-register components to catch potential changes.
// We only offer this in debug builds, though. // We only offer this in debug builds, though.
nsCOMPtr<nsILocalFile> flagFile; nsCOMPtr<nsILocalFile> flagFile;
#ifdef DEBUG
rv = NS_ERROR_FILE_NOT_FOUND; rv = NS_ERROR_FILE_NOT_FOUND;
nsCOMPtr<nsIFile> fFlagFile; nsCOMPtr<nsIFile> fFlagFile;
if (gAppData->directory) { if (gAppData->directory) {
@ -3366,7 +3364,7 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
if (flagFile) { if (flagFile) {
flagFile->AppendNative(FILE_INVALIDATE_CACHES); flagFile->AppendNative(FILE_INVALIDATE_CACHES);
} }
#endif
PRBool cachesOK; PRBool cachesOK;
PRBool versionOK = CheckCompatibility(profD, version, osABI, PRBool versionOK = CheckCompatibility(profD, version, osABI,
dirProvider.GetGREDir(), dirProvider.GetGREDir(),
@ -3415,11 +3413,10 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
dirProvider.GetGREDir(), gAppData->directory); dirProvider.GetGREDir(), gAppData->directory);
} }
#ifdef DEBUG
if (flagFile) { if (flagFile) {
flagFile->Remove(PR_TRUE); flagFile->Remove(PR_TRUE);
} }
#endif
PRBool appInitiatedRestart = PR_FALSE; PRBool appInitiatedRestart = PR_FALSE;
MOZ_SPLASHSCREEN_UPDATE(30); MOZ_SPLASHSCREEN_UPDATE(30);