rem: var spec = Components.lookupMethod(window.content.opener, "location") .call(); this.popupURL = IOS.newURI(spec, null, null); 
add: var opener = new XPCNativeWrapper(window.content, "opener").opener; var location = new XPCNativeWrapper(opener, "location").location; this.popupURL = IOS.newURI(location.href, null, null); 
context:     initPopupURL: function() {      // quick check: if no opener, it can't be a popup      if (!window.content.opener)        return;      try {        var show = false;        // is it a popup window?        const CI = Components.interfaces;        var xulwin = window                    .QueryInterface(CI.nsIInterfaceRequestor)                    .getInterface(CI.nsIWebNavigation)                    .QueryInterface(CI.nsIDocShellTreeItem)                    .treeOwner                    .QueryInterface(CI.nsIInterfaceRequestor)                    .getInterface(CI.nsIXULWindow);        if (xulwin.contextFlags &            CI.nsIWindowCreator2.PARENT_IS_LOADING_OR_RUNNING_TIMEOUT) {          // do the pref settings allow site-by-site popup management?          const PB = Components.classes["@mozilla.org/preferences-service;1"]                     .getService(CI.nsIPrefBranch);          show = !PB.getBoolPref("dom.disable_open_during_load");        }        if (show) {          // initialize popupURL          const IOS = Components.classes["@mozilla.org/network/io-service;1"]                      .getService(CI.nsIIOService);          var spec = Components.lookupMethod(window.content.opener, "location")                     .call();          this.popupURL = IOS.newURI(spec, null, null);          // but cancel if it's an unsuitable URL          const PM = Components.classes["@mozilla.org/PopupWindowManager;1"]                     .getService(CI.nsIPopupWindowManager);        }      } catch(e) {      }    },
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/b560561599dd9201667ca4051fdbc733279ff95d/nsContextMenu.js/clean/xpfe/communicator/resources/content/nsContextMenu.js