rem: var characterSet = Components.lookupMethod(this.target.ownerDocument, "characterSet") .call(this.target.ownerDocument); 
add: var ownerDocument = new XPCNativeWrapper(this.target, "ownerDocument").ownerDocument; var characterSet = new XPCNativeWrapper(ownerDocument, "characterSet").characterSet; 
context:     copyEmail : function () {        // Copy the comma-separated list of email addresses only.        // There are other ways of embedding email addresses in a mailto:        // link, but such complex parsing is beyond us.        var url = this.linkURL();        var qmark = url.indexOf( "?" );        var addresses;                if ( qmark > 7 ) {                   // 7 == length of "mailto:"            addresses = url.substring( 7, qmark );        } else {            addresses = url.substr( 7 );        }        // Let's try to unescape it using a character set        // in case the address is not ASCII.        try {          var characterSet = Components.lookupMethod(this.target.ownerDocument, "characterSet")                                       .call(this.target.ownerDocument);          const textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]                                         .getService(Components.interfaces.nsITextToSubURI);          addresses = textToSubURI.unEscapeNonAsciiURI(characterSet, addresses);        }        catch(ex) {          // Do nothing.        }        var clipboard = this.getService( "@mozilla.org/widget/clipboardhelper;1",                                         Components.interfaces.nsIClipboardHelper );        clipboard.copyString(addresses);    },    
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/b560561599dd9201667ca4051fdbc733279ff95d/nsContextMenu.js/clean/xpfe/communicator/resources/content/nsContextMenu.js