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 101311 b44ee676ced83226721c5b91309b4cbaf58dcfc3
parent 101169 688734575830713cdee907bf4f2c519edcf51d3c
child 101312 64bc6b0e91277037838cba030d27cd900afe211d
push id23229
push userrcampbell@mozilla.com
push dateFri, 03 Aug 2012 21:14:20 +0000
treeherdermozilla-central@a7fadfbad932 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersUnfocused
bugs779420
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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();
             }