Bug 1041475 - TEST-UNEXPECTED-FAIL | mozmill/content-tabs/test-install-xpi.js | test-install-xpi.js::test_install_corrupt_xpi + test-install-xpi.js::test_install_xpi_offer + test-install-xpi.js::test_xpinstall_disabled + test-install-xpi.js::test_xpinstall_actually_i (port bug 952201). r=mconley, a=jcranmer
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Tue, 22 Jul 2014 23:20:37 +0300
changeset 16399 42281e0027ee8c1a11e9dbf43e77025a8e770725
parent 16398 497d165dcae9024e07dfcae1e75699d811b5e65e
child 16400 acb745a4d796d46cf9dcb64db402257b6570305f
push id1234
push usermbanner@mozilla.com
push dateMon, 13 Oct 2014 17:59:18 +0000
treeherdercomm-esr52@b5a0add9fb18 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, jcranmer
bugs1041475, 952201
Bug 1041475 - TEST-UNEXPECTED-FAIL | mozmill/content-tabs/test-install-xpi.js | test-install-xpi.js::test_install_corrupt_xpi + test-install-xpi.js::test_install_xpi_offer + test-install-xpi.js::test_xpinstall_disabled + test-install-xpi.js::test_xpinstall_actually_i (port bug 952201). r=mconley, a=jcranmer
mail/base/content/specialTabs.js
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.js
@@ -1226,18 +1226,21 @@ var specialTabs = {
 
   xpInstallObserver: {
     observe: function (aSubject, aTopic, aData) {
       const Ci = Components.interfaces;
       let brandBundle = document.getElementById("bundle_brand");
       let messengerBundle = document.getElementById("bundle_messenger");
 
       let installInfo = aSubject.QueryInterface(Ci.amIWebInstallInfo);
-      let win = installInfo.originatingWindow;
-      let notificationBox = getNotificationBox(win.top);
+      // If not e10s, the window installing the add-ons, otherwise the
+      // browser installing the add-ons.
+      // XXX: needs reworking to do something useful if it's a browser.
+      let winOrBrowser = installInfo.originator;
+      let notificationBox = getNotificationBox(winOrBrowser.top);
       let notificationID = aTopic;
       let brandShortName = brandBundle.getString("brandShortName");
       let notificationName, messageString, buttons;
       const iconURL = "chrome://messenger/skin/icons/update.png";
 
       switch (aTopic) {
       case "addon-install-disabled":
         notificationID = "xpinstall-disabled";