Re: setTimeout without a DOM window using Timer.jsm

2013-03-02 Thread Simon Kornblith
Now might be a good time to try to bring up https://bugzilla.mozilla.org/show_bug.cgi?id=776798 again. Anything called from an nsITimerCallback from a JSM runs without the method JIT unless you explicitly set Components.utils.methodjit in the callback or use window.setTimeout on the hidden DOM win

setTimeout without a DOM window using Timer.jsm

2013-03-02 Thread Matt Brubeck
I noticed a number of places in Mozilla code where setTimeout-like functionality is needed, but DOM window.setTimeout is not available because the code runs in a non-DOM context like a JSM. In a few places we had created pure-JS implementations of window.setTimeout to solve this problem. Wit