rem: var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var handler = ioService.getProtocolHandler("file"); var fileHandler = handler.QueryInterface(Components.interfaces.nsIFileProtocolHandler);  var fileUrl = fileHandler.getURLSpecFromFile(fp.file); var uri = Components.classes["@mozilla.org/network/standard-url;1"]. createInstance(Components.interfaces.nsIURI); fileUrl += "?type=x-message-display"; uri.spec = fileUrl; 
add: var uri = fp.fileURL; uri.query = "type=x-message-display"; 
context: function MsgOpenFromFile(){   var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);   var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService();   strBundleService = strBundleService.QueryInterface(Components.interfaces.nsIStringBundleService);   var extbundle = strBundleService.createBundle("chrome://messenger/locale/messenger.properties");   var filterLabel = extbundle.GetStringFromName("EMLFiles");   var windowTitle = extbundle.GetStringFromName("OpenEMLFiles");   fp.init(window, windowTitle, nsIFilePicker.modeOpen);   fp.appendFilter(filterLabel, "*.eml");   // Default or last filter is "All Files"   fp.appendFilters(nsIFilePicker.filterAll);  try {     var ret = fp.show();     if (ret == nsIFilePicker.returnCancel)       return null;   }   catch (ex) {     dump("filePicker.chooseInputFile threw an exception\n");     return null;   }  var ioService = Components.classes["@mozilla.org/network/io-service;1"]                         .getService(Components.interfaces.nsIIOService);  var handler = ioService.getProtocolHandler("file");  var fileHandler = handler.QueryInterface(Components.interfaces.nsIFileProtocolHandler);  var fileUrl = fileHandler.getURLSpecFromFile(fp.file);  var uri = Components.classes["@mozilla.org/network/standard-url;1"].              createInstance(Components.interfaces.nsIURI);  fileUrl += "?type=x-message-display";  uri.spec = fileUrl;  MsgOpenNewWindowForMessage(uri, null);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/74337664518a45777dd4e2c38d6f159f07ffb0d7/mailWindowOverlay.js/buggy/mail/base/content/mailWindowOverlay.js