context:   onDrop: function (aEvent, aData, aDragSession)    {      var dataList = aData.dataList;      var dataListLength = dataList.length;      var errorTitle;      var attachment;      var errorMsg;      for (var i = 0; i < dataListLength; i++)       {        var item = dataList[i].first;        var prettyName;        var rawData = item.data;                if (item.flavour.contentType == "text/x-moz-url" ||            item.flavour.contentType == "text/x-moz-message" ||            item.flavour.contentType == "application/x-moz-file")        {          if (item.flavour.contentType == "application/x-moz-file")          {            var ioService = Components.classes["@mozilla.org/network/io-service;1"]                            .getService(Components.interfaces.nsIIOService);            var fileHandler = ioService.getProtocolHandler("file")                              .QueryInterface(Components.interfaces.nsIFileProtocolHandler);            rawData = fileHandler.getURLSpecFromFile(rawData);          }          else          {            var separator = rawData.indexOf("\n");            if (separator != -1)             {              prettyName = rawData.substr(separator+1);              rawData = rawData.substr(0,separator);            }          }          if (DuplicateFileCheck(rawData))           {            dump("Error, attaching the same item twice\n");          }          else           {            var isValid = true;            if (item.flavour.contentType == "text/x-moz-url") {              // if this is a url (or selected text)              // see if it's a valid url by checking               // if we can extract a scheme              // using the ioservice              //              // also skip mailto:, since it doesn't make sense              // to attach and send mailto urls              try {                var scheme = gIOService.extractScheme(rawData);                // don't attach mailto: urls                if (scheme == "mailto")                  isValid = false;              }              catch (ex) {                isValid = false;              }            }            if (isValid) {              attachment = Components.classes["@mozilla.org/messengercompose/attachment;1"]                           .createInstance(Components.interfaces.nsIMsgAttachment);              attachment.url = rawData;              attachment.name = prettyName;              AddAttachment(attachment);            }          }        }      }    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/4cc7df78f937cfb917c781be39bbe817682787c5/MsgComposeCommands.js/clean/mailnews/compose/resources/content/MsgComposeCommands.js