diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index e8bfadb0faf..af63a5bbd2a 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -206,8 +206,7 @@ void PipeWrap::OnConnection(uv_stream_t* handle, int status) { } // Instanciate the client javascript object and handle. - Local client_obj = - env->pipe_constructor_template()->GetFunction()->NewInstance(); + Local client_obj = Instantiate(env); // Unwrap the client javascript object. PipeWrap* wrap = Unwrap(client_obj);