Skip to content

Commit dc8b57f

Browse files
committedApr 18, 2019
src: use ArrayBufferAllocator::Create in node_worker.cc
Refs: #27220 PR-URL: #27251 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]>
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

+2-3
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)
Please sign in to comment.