summaryrefslogtreecommitdiff
path: root/src/udp_wrap.cc
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2020-05-07 13:31:56 -0700
committerJames M Snell <jasnell@gmail.com>2020-05-30 16:20:00 -0700
commit56ff1ee55a57b1169dc567f0f51e58a6f2ccda6d (patch)
tree581a72ccbbd7f82765943a982372f21069d5ecac /src/udp_wrap.cc
parentc24b74a7abec0848484671771d250cfd961f128e (diff)
downloadnode-new-56ff1ee55a57b1169dc567f0f51e58a6f2ccda6d.tar.gz
src: extract AllocatedBuffer from env.h
Cleanup up env.h by removing things that are not specific to `Environment`. PR-URL: https://github.com/nodejs/node/pull/33291 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'src/udp_wrap.cc')
-rw-r--r--src/udp_wrap.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc
index 9013bc9fe3..eb02db0a2a 100644
--- a/src/udp_wrap.cc
+++ b/src/udp_wrap.cc
@@ -20,6 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "udp_wrap.h"
+#include "allocated_buffer-inl.h"
#include "env-inl.h"
#include "node_buffer.h"
#include "node_sockaddr-inl.h"
@@ -688,7 +689,7 @@ void UDPWrap::OnAlloc(uv_handle_t* handle,
}
uv_buf_t UDPWrap::OnAlloc(size_t suggested_size) {
- return env()->AllocateManaged(suggested_size).release();
+ return AllocatedBuffer::AllocateManaged(env(), suggested_size).release();
}
void UDPWrap::OnRecv(uv_udp_t* handle,