diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index b2617a5695719e..5150972591d62f 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -55,13 +55,9 @@ void TCPWrap::Initialize(Local target, // Init properties t->InstanceTemplate()->Set(String::NewFromUtf8(env->isolate(), "reading"), Boolean::New(env->isolate(), false)); - t->InstanceTemplate()->Set(String::NewFromUtf8(env->isolate(), "owner"), - Null(env->isolate())); - t->InstanceTemplate()->Set(String::NewFromUtf8(env->isolate(), "onread"), - Null(env->isolate())); - t->InstanceTemplate()->Set(String::NewFromUtf8(env->isolate(), - "onconnection"), - Null(env->isolate())); + t->InstanceTemplate()->Set(env->owner_string(), Null(env->isolate())); + t->InstanceTemplate()->Set(env->onread_string(), Null(env->isolate())); + t->InstanceTemplate()->Set(env->onconnection_string(), Null(env->isolate())); env->SetProtoMethod(t, "close", HandleWrap::Close);