diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index 4143720cd23..6cb2bb65bb3 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -420,11 +420,11 @@ void UDPWrap::OnRecv(uv_udp_t* handle, UDPWrap* wrap = reinterpret_cast(handle->data); - Handle argv[4] = { - wrap->object_, + Local argv[4] = { + Local::New(wrap->object_), Integer::New(nread), - Null(), - Null() + Local::New(Null()), + Local::New(Null()) }; if (nread == -1) { @@ -433,7 +433,8 @@ void UDPWrap::OnRecv(uv_udp_t* handle, else { Local rinfo = Object::New(); AddressToJS(rinfo, addr, sizeof *addr); - argv[2] = Buffer::New(buf.base, nread, NULL, NULL)->handle_; + argv[2] = Local::New( + Buffer::New(buf.base, nread, NULL, NULL)->handle_); argv[3] = rinfo; } free(buf.base);