Bug 1329081-Port Bug 1323129 [Remove support for installing multiple xpis with InstallTrigger] to SeaMonkey. r=Ratty a=Ratty
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sat, 07 Jan 2017 23:16:12 +0100
changeset 20976 a614f645d43da4c018f7f6385c561e4b3324c65f
parent 20975 78c415cf613ecfd5cbedcb580d1cf5273981f9a9
child 20977 65c295598322d6863a3f6174de512c384ca19443
push id12723
push userfrgrahl@gmx.net
push dateSat, 07 Jan 2017 22:17:02 +0000
treeherdercomm-central@a614f645d43d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersRatty, Ratty
bugs1329081, 1323129
Bug 1329081-Port Bug 1323129 [Remove support for installing multiple xpis with InstallTrigger] to SeaMonkey. r=Ratty a=Ratty
suite/common/bindings/notification.xml
suite/installer/package-manifest.in
--- a/suite/common/bindings/notification.xml
+++ b/suite/common/bindings/notification.xml
@@ -402,41 +402,41 @@
               case "indexedDB-quota-cancel":
                 var requestor = aSubject.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
                 var contentWindow = requestor.getInterface(Components.interfaces.nsIDOMWindow);
                 if (contentWindow.top == browser.contentWindow)
                   this.cancelIndexedDB(requestor, contentWindow, "quota", aData);
                 break;
 
               case "addon-install-blocked":
-                var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
+                var installInfo = aSubject.wrappedJSObject;
                 if (installInfo.browser == browser)
                   this.addonInstallBlocked(installInfo);
                 break;
 
               case "addon-install-complete":
-                var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
+                var installInfo = aSubject.wrappedJSObject;
                 if (installInfo.browser == browser)
                   this.addonInstallComplete(installInfo);
                 break;
 
               case "addon-install-disabled":
-                var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
+                var installInfo = aSubject.wrappedJSObject;
                 if (installInfo.browser == browser)
                   this.addonInstallDisabled(installInfo);
                 break;
 
               case "addon-install-failed":
-                var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
+                var installInfo = aSubject.wrappedJSObject;
                 if (installInfo.browser == browser)
                   this.addonInstallFailed(installInfo);
                 break;
 
               case "addon-install-started":
-                var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
+                var installInfo = aSubject.wrappedJSObject;
                 if (installInfo.browser == browser)
                   this.addonInstallStarted(installInfo);
                 break;
 
               case "offline-cache-update-completed":
                 var doc = browser.contentDocument;
                 if (!doc.documentElement)
                   break;
@@ -1735,20 +1735,18 @@
             var buttons = [{
               label: this._stringBundle.GetStringFromName("addonDownloadRestartButton"),
               accessKey: this._stringBundle.GetStringFromName("addonDownloadRestartButton.accesskey"),
               popup: null,
               callback: function() {
                 var weblistener = Components.classes["@mozilla.org/addons/web-install-listener;1"]
                                             .getService(Components.interfaces.amIWebInstallListener);
                 if (weblistener.onWebInstallRequested(installInfo.browser, installInfo.originatingURI,
-                                                      installInfo.installs, installInfo.installs.length)) {
-                  installInfo.installs.forEach(function(aInstall) {
-                    aInstall.install();
-                  });
+                                                      [aInstall], 1)) {
+                  aInstall.install();
                 }
               }
             }];
             var priority = this.PRIORITY_INFO_MEDIUM;
             this.appendNotification(messageString, notificationName,
                                     null, priority, buttons);
 
             installInfo.installs.every(function(aInstall) {
@@ -2949,20 +2947,18 @@
             var action = {
               label: this._stringBundle.GetStringFromName("addonDownloadRestartButton"),
               accessKey: this._stringBundle.GetStringFromName("addonDownloadRestartButton.accesskey"),
               popup: null,
               callback: function() {
                 var weblistener = Components.classes["@mozilla.org/addons/web-install-listener;1"]
                                             .getService(Components.interfaces.amIWebInstallListener);
                 if (weblistener.onWebInstallRequested(installInfo.browser, installInfo.originatingURI,
-                                                      installInfo.installs, installInfo.installs.length)) {
-                  installInfo.installs.forEach(function(aInstall) {
-                    aInstall.install();
-                  });
+                                                      [aInstall], 1)) {
+                  aInstall.install();
                 }
               }
             };
             PopupNotifications.show(this.activeBrowser,
                                     "addon-install-cancelled", messageString,
                                     "addons-notification-icon", action);
 
             installInfo.installs.every(function(aInstall) {
--- a/suite/installer/package-manifest.in
+++ b/suite/installer/package-manifest.in
@@ -346,17 +346,16 @@
 @RESPATH@/components/xul.xpt
 @RESPATH@/components/xultmpl.xpt
 @RESPATH@/components/zipwriter.xpt
 
 ; JavaScript components
 @RESPATH@/components/addonManager.js
 @RESPATH@/components/amContentHandler.js
 @RESPATH@/components/amInstallTrigger.js
-@RESPATH@/components/amWebInstallListener.js
 @RESPATH@/components/BrowserElementParent.js
 @RESPATH@/components/BrowserElementParent.manifest
 @RESPATH@/components/captivedetect.js
 @RESPATH@/components/CaptivePortalDetectComponents.manifest
 @RESPATH@/components/ColorAnalyzer.js
 @RESPATH@/components/ConsoleAPIStorage.js
 @RESPATH@/components/ConsoleAPI.manifest
 @RESPATH@/components/contentAreaDropListener.js