rem: while (!message.isRead) { if (counter == messages.length) { dump('[bayesian filter message analysis complete.]\n'); gJunkmailComponent.mBatchUpdate = false; return; } messageUri = messages[counter]; message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri); ++counter; } 
context: function analyzeMessages(){    function processNext()    {        if (counter < messages.length) {            // XXX TODO jumping through hoops here.            var messageUri = messages[counter];            var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);            ++counter;            while (!message.isRead) {                if (counter == messages.length) {                    dump('[bayesian filter message analysis complete.]\n');                    gJunkmailComponent.mBatchUpdate = false;                    return;                }                messageUri = messages[counter];                message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);                ++counter;            }            analyze(message, processNext);        }        else {            dump('[bayesian filter message analysis complete.]\n');            gJunkmailComponent.batchUpdate = false;        }    }    getJunkmailComponent();    var messages = GetSelectedMessages();    var counter = 0;    gJunkmailComponent.batchUpdate = true;    dump('[bayesian filter message analysis begins.]\n');    processNext();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/7fbbf99073347c277ba327c02b01b7602a4855ed/mailCommands.js/clean/mailnews/base/resources/content/mailCommands.js