Skip to content

Commit dc8b57f

Browse files
committed
src: use ArrayBufferAllocator::Create in node_worker.cc
Refs: #27220 PR-URL: #27251 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent f9da3f0 commit dc8b57f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/node_worker.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class WorkerThreadData {
117117
public:
118118
explicit WorkerThreadData(Worker* w)
119119
: w_(w),
120-
array_buffer_allocator_(CreateArrayBufferAllocator()) {
120+
array_buffer_allocator_(ArrayBufferAllocator::Create()) {
121121
CHECK_EQ(uv_loop_init(&loop_), 0);
122122

123123
Isolate* isolate = NewIsolate(array_buffer_allocator_.get(), &loop_);
@@ -174,8 +174,7 @@ class WorkerThreadData {
174174
private:
175175
Worker* const w_;
176176
uv_loop_t loop_;
177-
DeleteFnPtr<ArrayBufferAllocator, FreeArrayBufferAllocator>
178-
array_buffer_allocator_;
177+
std::unique_ptr<ArrayBufferAllocator> array_buffer_allocator_;
179178
DeleteFnPtr<IsolateData, FreeIsolateData> isolate_data_;
180179

181180
friend class Worker;

0 commit comments

Comments
 (0)