When I refactored meteor/timers.js I extracted a method I called
"withCurrentInvocation", but what the code is actually doing is
ensuring that timer callbacks run *without* the current method
invocation (if any).
Rename to "withoutInvocation".
Fixes#1050.
With the upgrade to CoffeeScript 1.6.2 the source file name and line
number of a parse error is no longer present in the `message` field of
the exception.
In iOS Safari, `setTimeout` and `setInterval` events are not delivered
to inactive tabs (unless and until they become active again). This
means that using `setTimeout(fn, 0)` to run `fn` in the next event
loop can in fact delay `fn` indefinitely.
This implementation uses the native `setImmediate` (when available) or
`postMessage` (all other modern browsers); falling back to
`setTimeout` if the first two aren't available.
The `qa` subdirectory includes a manual test to check that `defer` is
working in inactive tabs. (Sadly the test can't run automatically
because scripts aren't allowed to open child windows except in
response to user events).
Factors out some common code in `timers.js`.
For repeatable unit test failures with "random" data it's useful to be
able to create deterministic random number sequences.
Introduce `Random.create(seed...)` which returns a object with the
`Random` API (`id()`, `choice()`, etc.) initialized with the passed
seed(s).
On OSX, we require sysctl to be in /usr/sbin, whereas in other scripts where
this code is duplicated (e.g. scripts/admin/launch-meteor), the assumption is
that sysctl is on the PATH.
dev-bundle exposes the shell script that downloads the dev bundle. We need this
in a package because both star-translate and tools/bundler.js need access to it.