Bug 1325223 - Remove ExtensionsUI.jsm workarounds, r=florian.
authorAndrew Swan <aswan@mozilla.com>
Fri, 20 Jan 2017 12:17:02 -0800
changeset 377792 4bfa82216639a496a20b05319d0c001ce1892e5f
parent 377791 98c3bfd85ae321add710899c3203498b9ec60ec6
child 377793 af973c7f5361a5d3636bdc10ec3549dbf4dd57f0
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1325223
milestone53.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 1325223 - Remove ExtensionsUI.jsm workarounds, r=florian.
browser/modules/ExtensionsUI.jsm
--- a/browser/modules/ExtensionsUI.jsm
+++ b/browser/modules/ExtensionsUI.jsm
@@ -218,29 +218,23 @@ this.ExtensionsUI = {
       return `localized description of single host permission for ${match[1]}`;
     };
 
     let msgs = [
       ...perms.permissions.map(formatPermission),
       ...perms.hosts.map(formatHostPermission),
     ];
 
-    let rendered = false;
     let popupOptions = {
       hideClose: true,
       popupIconURL: info.icon,
       persistent: true,
 
       eventCallback(topic) {
         if (topic == "showing") {
-          // This check can be removed when bug 1325223 is resolved.
-          if (rendered) {
-            return false;
-          }
-
           let doc = this.browser.ownerDocument;
           doc.getElementById("addon-webext-perm-header").textContent = header;
 
           let list = doc.getElementById("addon-webext-perm-list");
           while (list.firstChild) {
             list.firstChild.remove();
           }
 
@@ -252,21 +246,17 @@ this.ExtensionsUI = {
           listHeaderEl.value = listHeader;
           listHeaderEl.hidden = (msgs.length == 0);
 
           for (let msg of msgs) {
             let item = doc.createElementNS(HTML_NS, "li");
             item.textContent = msg;
             list.appendChild(item);
           }
-          rendered = true;
-        } else if (topic == "dismissed") {
-          rendered = false;
         } else if (topic == "swapping") {
-          rendered = false;
           return true;
         }
         return false;
       },
     };
 
     return new Promise(resolve => {
       win.PopupNotifications.show(target, "addon-webext-permissions", "",