From b84ebfe8860edfb83bff945c30d41e2d9c32dfca Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Mon, 17 Mar 2014 14:39:37 -0700 Subject: [PATCH] pipe_wrap: use Instantiate() method Retrieve a new client object via PipeWrap::Instantiate(). This method performs appropriate checks to make sure everything is as it should be. --- src/pipe_wrap.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index e8bfadb..af63a5b 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); -- 2.7.4