context:   fillPopupList: function (aEvent)  {    var bundle_browser = document.getElementById("bundle_browser");    // XXXben - rather than using |currentURI| here, which breaks down on multi-framed sites    //          we should really walk the pageReport and create a list of "allow for <host>"    //          menuitems for the common subset of hosts present in the report, this will    //          make us frame-safe.    var uri = gBrowser.selectedBrowser.webNavigation.currentURI;    var blockedPopupAllowSite = document.getElementById("blockedPopupAllowSite");    try {      blockedPopupAllowSite.removeAttribute("hidden");            var pm = Components.classes["@mozilla.org/permissionmanager;1"]                        .getService(this._kIPM);      if (pm.testPermission(uri, "popup") == this._kIPM.ALLOW_ACTION) {        // Offer an item to block popups for this site, if a whitelist entry exists        // already for it.        var blockString = bundle_browser.getFormattedString("popupBlock", [uri.host]);        blockedPopupAllowSite.setAttribute("label", blockString);        blockedPopupAllowSite.setAttribute("block", "true");      }      else {        // Offer an item to allow popups for this site        var allowString = bundle_browser.getFormattedString("popupAllow", [uri.host]);        blockedPopupAllowSite.setAttribute("label", allowString);        blockedPopupAllowSite.removeAttribute("block");      }    }    catch (e) {      blockedPopupAllowSite.setAttribute("hidden", "true");    }        var item = aEvent.target.lastChild;    while (item && item.getAttribute("observes") != "blockedPopupsSeparator") {      var next = item.previousSibling;      item.parentNode.removeChild(item);      item = next;    }    var blockedPopupsSeparator;    var pageReport = gBrowser.selectedBrowser.pageReport;    if (pageReport && pageReport.length > 0) {      blockedPopupsSeparator = document.getElementById("blockedPopupsSeparator");      blockedPopupsSeparator.removeAttribute("hidden");      for (var i = 0; i < pageReport.length; ++i) {        var popupURIspec = pageReport[i].popupWindowURI.spec;        if (popupURIspec == "" || popupURIspec == "about:blank" ||            popupURIspec == uri.spec)          continue;        var menuitem = document.createElement("menuitem");        var label = bundle_browser.getFormattedString("popupShowPopupPrefix",                                                       [popupURIspec]);        menuitem.setAttribute("label", label);        menuitem.setAttribute("requestingWindowURI", pageReport[i].requestingWindowURI.spec);        menuitem.setAttribute("popupWindowURI", popupURIspec);        menuitem.setAttribute("popupWindowFeatures", pageReport[i].popupWindowFeatures);        menuitem.setAttribute("oncommand", "gPopupBlockerObserver.showBlockedPopup(event);");        aEvent.target.appendChild(menuitem);      }    }    else {      blockedPopupsSeparator = document.getElementById("blockedPopupsSeparator");      blockedPopupsSeparator.setAttribute("hidden", "true");    }            var blockedPopupDontShowMessage = document.getElementById("blockedPopupDontShowMessage");    var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");    blockedPopupDontShowMessage.setAttribute("checked", !showMessage);    if (aEvent.target.localName == "popup")      blockedPopupDontShowMessage.setAttribute("label", bundle_browser.getString("popupWarningDontShowFromMessage"));    else      blockedPopupDontShowMessage.setAttribute("label", bundle_browser.getString("popupWarningDontShowFromStatusbar"));  },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/2fb9feaadc992e3ccd442db789244b253d0427f8/browser.js/buggy/browser/base/content/browser.js