MozMill upgrade incoming, waitForEval users beware

Siddharth Agarwal sagarwal at
Wed Jun 8 00:33:46 UTC 2011

We're probably going to upgrade to MozMill 1.5.4 soon [1], and one of 
the changes introduced [2] is that if a waitForEval times out, it throws 
an exception instead of just returning false. We started throwing 
exceptions on timeouts over a year ago [3], so we're mostly set, but 
apparently we missed at least one instance (fixed as part of [1]).

Going forward, I think the best practice is to
- use utils.waitFor [4] instead of controller.waitForEval. Any statement 
of the form controller.waitForEval("subject()", timeout, interval, 
callback) simply becomes utils.waitFor(callback, message, timeout, 
interval) with an optional |this| object at the end. timeout and 
interval are also optional -- the defaults are 5 seconds and 100ms 
respectively, which are pretty close to our NORMAL_TIMEOUT (6 seconds) 
and FAST_INTERVAL (100ms). I think the defaults are fine here, but I'm 
willing to listen to arguments to the contrary.
- pass in a helpful message as the second argument to waitFor, wherever 


More information about the tb-planning mailing list