diff options
author | James M Snell <jasnell@gmail.com> | 2020-05-07 23:31:56 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-05-31 02:20:00 +0300 |
commit | 56ff1ee55a57b1169dc567f0f51e58a6f2ccda6d (patch) | |
tree | 581a72ccbbd7f82765943a982372f21069d5ecac /src/stream_pipe.cc | |
parent | c24b74a7abec0848484671771d250cfd961f128e (diff) |
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/stream_pipe.cc')
-rw-r--r-- | src/stream_pipe.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stream_pipe.cc b/src/stream_pipe.cc index 1bed4514eb8..1422f9e0ea5 100644 --- a/src/stream_pipe.cc +++ b/src/stream_pipe.cc @@ -1,4 +1,5 @@ #include "stream_pipe.h" +#include "allocated_buffer-inl.h" #include "stream_base-inl.h" #include "node_buffer.h" #include "util-inl.h" @@ -118,7 +119,7 @@ uv_buf_t StreamPipe::ReadableListener::OnStreamAlloc(size_t suggested_size) { StreamPipe* pipe = ContainerOf(&StreamPipe::readable_listener_, this); size_t size = std::min(suggested_size, pipe->wanted_data_); CHECK_GT(size, 0); - return pipe->env()->AllocateManaged(size).release(); + return AllocatedBuffer::AllocateManaged(pipe->env(), size).release(); } void StreamPipe::ReadableListener::OnStreamRead(ssize_t nread, |