diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2012-03-26 07:04:06 -0700 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-03-30 21:24:01 +0200 |
commit | 036d907df702c1db3a4da826dd04ea85f384d69d (patch) | |
tree | 166911987a96230867a22ed75327532a5b07279b /src/tcp_wrap.cc | |
parent | 300596526647adc9da8db2615b3e70258de9e1bd (diff) | |
download | node-new-036d907df702c1db3a4da826dd04ea85f384d69d.tar.gz |
tcp: root JS objects in HandleScope with Local<>
Diffstat (limited to 'src/tcp_wrap.cc')
-rw-r--r-- | src/tcp_wrap.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index 7f84cfc49f..2e84f3741a 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -57,20 +57,21 @@ namespace node { -using v8::Object; +using v8::Arguments; +using v8::Context; +using v8::Function; +using v8::FunctionTemplate; using v8::Handle; +using v8::HandleScope; +using v8::Integer; using v8::Local; +using v8::Object; +using v8::Null; using v8::Persistent; -using v8::Value; -using v8::HandleScope; -using v8::FunctionTemplate; using v8::String; -using v8::Function; using v8::TryCatch; -using v8::Context; -using v8::Arguments; -using v8::Integer; using v8::Undefined; +using v8::Value; static Persistent<Function> tcpConstructor; static Persistent<String> family_symbol; @@ -355,7 +356,7 @@ void TCPWrap::OnConnection(uv_stream_t* handle, int status) { // uv_close() on the handle. assert(wrap->object_.IsEmpty() == false); - Handle<Value> argv[1]; + Local<Value> argv[1]; if (status == 0) { // Instantiate the client javascript object and handle. @@ -372,7 +373,7 @@ void TCPWrap::OnConnection(uv_stream_t* handle, int status) { argv[0] = client_obj; } else { SetErrno(uv_last_error(uv_default_loop())); - argv[0] = v8::Null(); + argv[0] = Local<Value>::New(Null()); } MakeCallback(wrap->object_, "onconnection", 1, argv); |