joyent/node — pull request #5142 by trevnorris (2013-03-26 05:47:00+00:00)
Title: domain: fix domain callback from MakeCallback

Since _tickCallback and _tickDomainCallback were both called from
MakeCallback, it was possible for a callback to be called that required
a domain directly to _tickCallback.

The fix was to implement process.usingDomains(). This will set all
applicable functions to their domain counterparts, and set a flag in cc
to let MakeCallback know domain callbacks always need to be checked.

Added test for this case.

Fix for #5131

/cc @isaacs