rem: state.loadPendingData += state.loadFile.read(state.loadChunk); 
add:  var newChunk = state.loadFile.read(state.loadChunk); if (newChunk) state.loadPendingData += newChunk; 
context: function doCurrentStatusRun(){    if (state.state == STATE_LIST_THEN_LOAD)    {        // Update the progress and end if /list done for "list only" state.        updateProgress(getMsg(MSG_CD_FETCHED, network._list.count), -1);        if (network._list.done)            setSubstate(SUBSTATE_END);    }    /* If we're doing the list+load state, flag is as ok to stop loading the     * file when the network has finished doing the /list.     */    if ((state.state == STATE_LIST_AND_LOAD) && network._list.done)        state.loadNeverComplete = false;    // Do file handling for loading states.    if ((state.state == STATE_LOAD) || (state.state == STATE_LIST_AND_LOAD))    {        // Adjust chunk size to keep time per-chunk between 750ms and 1000ms.        if ((state.timeTaken > 1.25 * STATE_DELAY) && (state.loadChunk >= 2000))            state.loadChunk -= 1000;        else if ((state.timeTaken > STATE_DELAY) && (state.loadChunk >= 1100))            state.loadChunk -= 100;        if (state.timeTaken < 0.5 * STATE_DELAY)            state.loadChunk += 1000;        else if (state.timeTaken < 0.75 * STATE_DELAY)            state.loadChunk += 100;        state.loadedSoFar += state.loadChunk;        state.loadPendingData += state.loadFile.read(state.loadChunk);        while (state.loadPendingData.indexOf("\n") != -1)        {            var lines = state.loadPendingData.split("\n");            state.loadPendingData = lines.pop();            for (var i = 0; i < lines.length; i++)            {                var ary = lines[i].match(/^([^ ]+) ([^ ]+) (.*)$/);                if (ary)                {                    var chan = new ChannelEntry(toUnicode(ary[1], "UTF-8"), ary[2],                                                toUnicode(ary[3], "UTF-8"));                    channels.push(chan);                }            }        }        var dataLeft = state.loadFile.inputStream.available();        var pro = state.loadedSoFar / (state.loadedSoFar + dataLeft);        pro = Math.round(100 * pro);        updateProgress(getMsg(MSG_CD_LOADED, channels.length), pro);        // Done if there is no more data, and we're not *expecting* any more.        if ((dataLeft == 0) && !state.loadNeverComplete)            setSubstate(SUBSTATE_END);    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/b6063a28fbefe309a7e191934dbcc85a4ed1b36b/channels.js/clean/extensions/irc/xul/content/channels.js