mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
async-wrap: pass PROVIDER as first arg to init
Allow the init callback to see the PROVIDER type easily by being able to compare the flag with the list of providers on the exported async_wrap object. PR-URL: https://github.com/iojs/io.js/pull/1614 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
1 parent
84bf609fd2
commit
4b2c786449
1 file changed
+2
-1
@@ -48,7 +48,8 @@ inline AsyncWrap::AsyncWrap(Environment* env,
|
||||
FatalError("node::AsyncWrap::AsyncWrap", "parent pre hook threw");
|
||||
}
|
||||
|
||||
env->async_hooks_init_function()->Call(object, 0, nullptr);
|
||||
v8::Local<v8::Value> n = v8::Int32::New(env->isolate(), provider);
|
||||
env->async_hooks_init_function()->Call(object, 1, &n);
|
||||
|
||||
if (try_catch.HasCaught())
|
||||
FatalError("node::AsyncWrap::AsyncWrap", "init hook threw");
|
||||
|
||||
Reference in new issue
Block a user