Bug 304115 compreg.dat isn't rebuilt properly after Software Update. r+a=bsmedberg

This commit is contained in:
rob_strong%exchangecode.com 2005-08-11 19:22:35 +00:00
parent 99a1ce5252
commit bee2ca94ab

View File

@ -2344,13 +2344,14 @@ ExtensionManager.prototype = {
*/
start: function(commandLine) {
var isDirty = false;
var forceAutoReg = false;
// Somehow the component list went away, and for that reason the new one
// generated by this function is going to result in a different compreg.
// We must force a restart.
var componentList = getFile(KEY_PROFILEDIR, [FILE_EXTENSION_MANIFEST]);
if (!componentList.exists())
isDirty = true;
forceAutoReg = true;
// Check for missing manifests - e.g. missing extensions.ini, missing
// extensions.cache, extensions.rdf etc. If any of these files
@ -2370,8 +2371,15 @@ ExtensionManager.prototype = {
isDirty = true;
// Extension Changes
if (isDirty)
return this._finishOperations();
if (isDirty) {
var needsRestart = this._finishOperations();
if (forceAutoReg) {
this._extensionListChanged = true;
needsRestart = true;
}
return needsRestart;
}
this._startTimers();
@ -3096,6 +3104,11 @@ ExtensionManager.prototype = {
var lastAppVersion = getPref("getCharPref", PREF_EM_LAST_APP_VERSION, "");
if (currAppVersion == lastAppVersion)
return false;
// With a new profile lastAppVersion doesn't exist yet.
if (!lastAppVersion) {
gPref.setCharPref(PREF_EM_LAST_APP_VERSION, currAppVersion);
return false;
}
// Version mismatch, we have to load the extensions datasource and do
// version checking. Time hit here doesn't matter since this doesn't happen
@ -3116,6 +3129,7 @@ ExtensionManager.prototype = {
this._appDisableItem(items[i].id);
// Now update the last app version so we don't do this checking again.
gPref.setCharPref(PREF_EM_LAST_APP_VERSION, currAppVersion);
this._updateManifests(true);
return true;
},