Bug 1315407 Fix sdk addon-install r=mossop
authorAndrew Swan <aswan@mozilla.com>
Fri, 11 Nov 2016 10:13:13 -0800
changeset 348904 bba6abab045cd8cf8dacf9be49c95e3feab5794b
parent 348903 1aea09315a925e250310ff6e7f33104a1d3f481d
child 348905 680467d99ed63d1b3a37e5c61d3c4302f5181418
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1315407
milestone52.0a1
Bug 1315407 Fix sdk addon-install r=mossop MozReview-Commit-ID: FuECBIHE7xR
addon-sdk/source/lib/sdk/addon/installer.js
--- a/addon-sdk/source/lib/sdk/addon/installer.js
+++ b/addon-sdk/source/lib/sdk/addon/installer.js
@@ -59,17 +59,17 @@ exports.install = function install(xpiPa
     },
     onDownloadFailed: function(aInstall) {
       this.onInstallFailed(aInstall);
     }
   };
 
   // Order AddonManager to install the addon
   AddonManager.getInstallForFile(file, function(install) {
-    if (install.error != null) {
+    if (install.error == 0) {
       install.addListener(listener);
       install.install();
     } else {
       reject(install.error);
     }
   });
 
   return promise;