Commit a4e9487a authored by Trevor Norris's avatar Trevor Norris
Browse files

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: default avatarFedor Indutny <fedor@indutny.com>
parent 33827e3f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment