Bug 299458 - Speed up ChatZilla's response to messages when not 'busy', and also make the main event loop resiliant to exceptions.

ChatZilla only.
r=rginda
This commit is contained in:
silver%warwickcompsoc.co.uk 2005-09-21 01:09:28 +00:00
parent 12d567368d
commit cceaef6257

View File

@ -1484,8 +1484,20 @@ function playSound(file)
/* timer-based mainloop */
function mainStep()
{
client.eventPump.stepEvents();
setTimeout ("mainStep()", client.STEP_TIMEOUT);
try
{
var count = client.eventPump.stepEvents();
if (count > 0)
setTimeout("mainStep()", client.STEP_TIMEOUT);
else
setTimeout("mainStep()", client.STEP_TIMEOUT / 5);
}
catch(ex)
{
dd("Exception in mainStep!");
dd(formatException(ex));
setTimeout("mainStep()", client.STEP_TIMEOUT);
}
}
function openQueryTab(server, nick)