|
| 1 | +From facdec6ed7516d3c6273543c480aa00af7a81ad1 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Chen Li1 <li1.chen@intel.com> |
| 3 | +Date: Thu, 4 Nov 2021 15:41:33 +0800 |
| 4 | +Subject: [PATCH] Upgrade to node 14 |
| 5 | + |
| 6 | +--- |
| 7 | + erizoAPI/IOThreadPool.cc | 4 ++-- |
| 8 | + erizoAPI/ThreadPool.cc | 4 ++-- |
| 9 | + 2 files changed, 4 insertions(+), 4 deletions(-) |
| 10 | + |
| 11 | +diff --git a/erizoAPI/IOThreadPool.cc b/erizoAPI/IOThreadPool.cc |
| 12 | +index 0144e6b1..41264ad3 100644 |
| 13 | +--- a/erizoAPI/IOThreadPool.cc |
| 14 | ++++ b/erizoAPI/IOThreadPool.cc |
| 15 | +@@ -29,7 +29,7 @@ NAN_MODULE_INIT(IOThreadPool::Init) { |
| 16 | + Nan::SetPrototypeMethod(tpl, "close", close); |
| 17 | + Nan::SetPrototypeMethod(tpl, "start", start); |
| 18 | + |
| 19 | +- constructor.Reset(tpl->GetFunction()); |
| 20 | ++ constructor.Reset(Nan::GetFunction(tpl).ToLocalChecked()); |
| 21 | + Nan::Set(target, Nan::New("IOThreadPool").ToLocalChecked(), Nan::GetFunction(tpl).ToLocalChecked()); |
| 22 | + } |
| 23 | + |
| 24 | +@@ -38,7 +38,7 @@ NAN_METHOD(IOThreadPool::New) { |
| 25 | + Nan::ThrowError("Wrong number of arguments"); |
| 26 | + } |
| 27 | + |
| 28 | +- unsigned int num_workers = info[0]->IntegerValue(); |
| 29 | ++ unsigned int num_workers = Nan::To<int32_t>(info[0]).FromJust(); |
| 30 | + |
| 31 | + IOThreadPool* obj = new IOThreadPool(); |
| 32 | + obj->me.reset(new erizo::IOThreadPool(num_workers)); |
| 33 | +diff --git a/erizoAPI/ThreadPool.cc b/erizoAPI/ThreadPool.cc |
| 34 | +index ddfdcfc9..478e2c37 100644 |
| 35 | +--- a/erizoAPI/ThreadPool.cc |
| 36 | ++++ b/erizoAPI/ThreadPool.cc |
| 37 | +@@ -29,7 +29,7 @@ NAN_MODULE_INIT(ThreadPool::Init) { |
| 38 | + Nan::SetPrototypeMethod(tpl, "close", close); |
| 39 | + Nan::SetPrototypeMethod(tpl, "start", start); |
| 40 | + |
| 41 | +- constructor.Reset(tpl->GetFunction()); |
| 42 | ++ constructor.Reset(Nan::GetFunction(tpl).ToLocalChecked()); |
| 43 | + Nan::Set(target, Nan::New("ThreadPool").ToLocalChecked(), Nan::GetFunction(tpl).ToLocalChecked()); |
| 44 | + } |
| 45 | + |
| 46 | +@@ -38,7 +38,7 @@ NAN_METHOD(ThreadPool::New) { |
| 47 | + Nan::ThrowError("Wrong number of arguments"); |
| 48 | + } |
| 49 | + |
| 50 | +- unsigned int num_workers = info[0]->IntegerValue(); |
| 51 | ++ unsigned int num_workers = Nan::To<int32_t>(info[0]).FromJust(); |
| 52 | + |
| 53 | + ThreadPool* obj = new ThreadPool(); |
| 54 | + obj->me.reset(new erizo::ThreadPool(num_workers)); |
| 55 | +-- |
| 56 | +2.17.1 |
| 57 | + |
0 commit comments