diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index ba84af19c02d23..46d0e19e536eed 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -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 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");