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 committed 2019-04-18 13:03:26 +02:00
1 parent f9da3f0cce
commit dc8b57fdc1
1 file changed
+2 -3
+2 -3
View File
@@ -117,7 +117,7 @@ class WorkerThreadData {
public:
explicit WorkerThreadData(Worker* w)
: w_(w),
array_buffer_allocator_(CreateArrayBufferAllocator()) {
array_buffer_allocator_(ArrayBufferAllocator::Create()) {
CHECK_EQ(uv_loop_init(&loop_), 0);
Isolate* isolate = NewIsolate(array_buffer_allocator_.get(), &loop_);
@@ -174,8 +174,7 @@ class WorkerThreadData {
private:
Worker* const w_;
uv_loop_t loop_;
DeleteFnPtr<ArrayBufferAllocator, FreeArrayBufferAllocator>
array_buffer_allocator_;
std::unique_ptr<ArrayBufferAllocator> array_buffer_allocator_;
DeleteFnPtr<IsolateData, FreeIsolateData> isolate_data_;
friend class Worker;