async_wrap: allow some hooks to be optional
Only enforce that the init callback is passed to setupHooks(). The remaining hooks can be optionally passed. Throw if async_wrap.enable() runs before setting the init callback or if setupHooks() is called while async wrap is enabled. Add test to verify calls throw appropriately. PR-URL: https://github.com/nodejs/node/pull/3461 Reviewed-By:Fedor Indutny <fedor@indutny.com>
parent
33827e3f
Please register or sign in to comment