Backed out changeset bd45588af02e (bug 1314125) for timing out in browser_permission_doorhanger.js on e10s. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 02 Nov 2016 00:36:55 +0100
changeset 347137 53b4f35c5830850f9609a451a139bffcf93233c2
parent 347136 aea91a3516ab3b1d993b0c7fdd54c42ac759af6e
child 347138 a8211df712a7e01999d0256aa8e5b1ec7a9c1ea3
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)
reviewersbackout
bugs1314125
milestone52.0a1
backs outbd45588af02e58ab94344d352e8bd09d4125d06b
Backed out changeset bd45588af02e (bug 1314125) for timing out in browser_permission_doorhanger.js on e10s. r=backout
toolkit/modules/PopupNotifications.jsm
--- a/toolkit/modules/PopupNotifications.jsm
+++ b/toolkit/modules/PopupNotifications.jsm
@@ -1049,17 +1049,21 @@ PopupNotifications.prototype = {
         anchors.add(notification.anchorElement)
     }
     if (defaultAnchor && !anchors.size)
       anchors.add(defaultAnchor);
     return anchors;
   },
 
   _isActiveBrowser: function (browser) {
-    return this.tabbrowser.selectedBrowser == browser;
+    // Note: This helper only exists, because in e10s builds,
+    // we can't access the docShell of a browser from chrome.
+    return browser.docShell
+      ? browser.docShell.isActive
+      : (this.window.gBrowser.selectedBrowser == browser);
   },
 
   _onIconBoxCommand: function PopupNotifications_onIconBoxCommand(event) {
     // Left click, space or enter only
     let type = event.type;
     if (type == "click" && event.button != 0)
       return;