diff options
author | Andreas Madsen <amwebdk@gmail.com> | 2016-01-20 18:20:43 +0100 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2016-02-18 13:49:51 -0700 |
commit | 11c672bc77a3286bb9d3b7d625410f1ff662b943 (patch) | |
tree | 0ba79ed204498a4b6d283813f040fddbe5d0b666 /src/async-wrap-inl.h | |
parent | c6c7d8b3253295a01a7e26fb9465b5238b76f4f9 (diff) | |
download | node-new-11c672bc77a3286bb9d3b7d625410f1ff662b943.tar.gz |
async_wrap: add parent uid to init hook
When the parent uid is required it is not necessary to store the uid in
the parent handle object.
PR-URL: https://github.com/nodejs/node/pull/4600
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'src/async-wrap-inl.h')
-rw-r--r-- | src/async-wrap-inl.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index e68c6af4d6..e6b24af7fd 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -42,11 +42,14 @@ inline AsyncWrap::AsyncWrap(Environment* env, v8::Local<v8::Value> argv[] = { v8::Integer::New(env->isolate(), get_uid()), v8::Int32::New(env->isolate(), provider), + Null(env->isolate()), Null(env->isolate()) }; - if (parent != nullptr) - argv[2] = parent->object(); + if (parent != nullptr) { + argv[2] = v8::Integer::New(env->isolate(), parent->get_uid()); + argv[3] = parent->object(); + } v8::MaybeLocal<v8::Value> ret = init_fn->Call(env->context(), object, ARRAY_SIZE(argv), argv); |