src: use ArrayBufferAllocator::Create in node_worker.cc

Refs: https://github.com/nodejs/node/pull/27220

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Anna Henningsen 2019-04-16 11:26:45 +02:00
parent f9da3f0cce
commit dc8b57fdc1
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -117,7 +117,7 @@ class WorkerThreadData {
public: public:
explicit WorkerThreadData(Worker* w) explicit WorkerThreadData(Worker* w)
: w_(w), : w_(w),
array_buffer_allocator_(CreateArrayBufferAllocator()) { array_buffer_allocator_(ArrayBufferAllocator::Create()) {
CHECK_EQ(uv_loop_init(&loop_), 0); CHECK_EQ(uv_loop_init(&loop_), 0);
Isolate* isolate = NewIsolate(array_buffer_allocator_.get(), &loop_); Isolate* isolate = NewIsolate(array_buffer_allocator_.get(), &loop_);
@ -174,8 +174,7 @@ class WorkerThreadData {
private: private:
Worker* const w_; Worker* const w_;
uv_loop_t loop_; uv_loop_t loop_;
DeleteFnPtr<ArrayBufferAllocator, FreeArrayBufferAllocator> std::unique_ptr<ArrayBufferAllocator> array_buffer_allocator_;
array_buffer_allocator_;
DeleteFnPtr<IsolateData, FreeIsolateData> isolate_data_; DeleteFnPtr<IsolateData, FreeIsolateData> isolate_data_;
friend class Worker; friend class Worker;