rem: listener.onMessageClassified(aMsgHdr.folder.generateMessageURI(aMsgHdr.messageKey), nsIJunkMailPlugin.GOOD); 
add:    aNextFunction(); 
context: function analyze(aMsgHdr, aNextFunction){    var listener = {        onMessageClassified: function(aMsgURI, aClassification)        {            dump(aMsgURI + ' is '                  + (aClassification == nsIJunkMailPlugin.JUNK                    ? 'JUNK' : 'GOOD') + '\n');            // XXX TODO, make the cut off 50, like in nsMsgSearchTerm.cpp            var score =                 aClassification == nsIJunkMailPlugin.JUNK ? "100" : "0";            // set these props via the db (instead of the message header            // directly) so that the nsMsgDBView knows to update the UI            //            var db = aMsgHdr.folder.getMsgDatabase(msgWindow);            db.setStringProperty(aMsgHdr.messageKey, "junkscore", score);            db.setStringProperty(aMsgHdr.messageKey, "junkscoreorigin",                                  "plugin");            aNextFunction();        }    };    // if we are whitelisting, check if the email address is in the whitelist addressbook.    var spamSettings = aMsgHdr.folder.server.spamSettings;    if (spamSettings.useWhiteList && spamSettings.whiteListAbURI)    {      var whiteListDirectory = RDF.GetResource(spamSettings.whiteListAbURI).QueryInterface(Components.interfaces.nsIAbMDBDirectory);      var headerParser = Components.classes["@mozilla.org/messenger/headerparser;1"].getService(Components.interfaces.nsIMsgHeaderParser);      var authorEmailAddress = new Object;      headerParser.extractHeaderAddressMailboxes(null, aMsgHdr.author, authorEmailAddress);      if (whiteListDirectory.hasCardForEmailAddress(authorEmailAddress.value))      {        listener.onMessageClassified(aMsgHdr.folder.generateMessageURI(aMsgHdr.messageKey), nsIJunkMailPlugin.GOOD);        return;      }    }    var messageURI = aMsgHdr.folder.generateMessageURI(aMsgHdr.messageKey)        + "?fetchCompleteMessage=true";    gJunkmailComponent.classifyMessage(messageURI, msgWindow, listener);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/af08788f09cc36a6033e2125233d74697130f0d4/mailCommands.js/clean/mailnews/base/resources/content/mailCommands.js