From e99e47733ea0426862ce63900c247811021325a1 Mon Sep 17 00:00:00 2001 From: abetomo Date: Thu, 5 Jul 2018 10:25:35 +0900 Subject: [PATCH] Fix deprecated callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The following warning. ``` ../src/worker.cc: In member function ‘virtual void CheckSpellingWorker::HandleOKCallback()’: ../src/worker.cc:44:25: warning: ‘v8::Local Nan::Callback::Call(int, v8::Local*) const’ is deprecated [-Wdeprecated-declarations] callback->Call(2, argv); ``` --- src/worker.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/worker.cc b/src/worker.cc index fbae5ec..3d24cf0 100644 --- a/src/worker.cc +++ b/src/worker.cc @@ -41,5 +41,6 @@ void CheckSpellingWorker::HandleOKCallback() { } Local argv[] = { Nan::Null(), result }; - callback->Call(2, argv); + Nan::AsyncResource resource("CheckSpellingWorker::HandleOKCallback"); + callback->Call(2, argv, &resource); }