Bug 779420 - Fix mixed up variable names newVersion/oldVersion in XPIProvider.processPendingFileChanges. r=Unfocused
authorEkanan Ketunuti <ananuti@gmail.com>
Thu, 02 Aug 2012 13:48:46 +0700
changeset 101170 b44ee676ced83226721c5b91309b4cbaf58dcfc3
parent 101169 688734575830713cdee907bf4f2c519edcf51d3c
child 101171 64bc6b0e91277037838cba030d27cd900afe211d
push id975
push userbmcbride@mozilla.com
push dateFri, 03 Aug 2012 03:29:10 +0000
treeherderfx-team@b44ee676ced8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersUnfocused
bugs779420
milestone17.0a1
Bug 779420 - Fix mixed up variable names newVersion/oldVersion in XPIProvider.processPendingFileChanges. r=Unfocused
toolkit/mozapps/extensions/XPIProvider.jsm
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -2026,19 +2026,19 @@ var XPIProvider = {
           try {
             var existingAddon = aLocation.getLocationForID(existingAddonID);
             if (this.bootstrappedAddons[existingAddonID].descriptor ==
                 existingAddon.persistentDescriptor) {
               oldBootstrap = this.bootstrappedAddons[existingAddonID];
 
               // We'll be replacing a currently active bootstrapped add-on so
               // call its uninstall method
-              let oldVersion = aManifests[aLocation.name][id].version;
-              let newVersion = oldBootstrap.version;
-              let uninstallReason = Services.vc.compare(newVersion, oldVersion) < 0 ?
+              let newVersion = aManifests[aLocation.name][id].version;
+              let oldVersion = oldBootstrap.version;
+              let uninstallReason = Services.vc.compare(oldVersion, newVersion) < 0 ?
                                     BOOTSTRAP_REASONS.ADDON_UPGRADE :
                                     BOOTSTRAP_REASONS.ADDON_DOWNGRADE;
 
               this.callBootstrapMethod(existingAddonID, oldBootstrap.version,
                                        oldBootstrap.type, existingAddon, "uninstall", uninstallReason);
               this.unloadBootstrapScope(existingAddonID);
               flushStartupCache();
             }