Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit d1fcd7f

Browse files
committed
Fix deprecated callback
The following warning. ``` ../src/worker.cc: In member function ‘virtual void CheckSpellingWorker::HandleOKCallback()’: ../src/worker.cc:44:25: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations] callback->Call(2, argv); ```
1 parent ae42da3 commit d1fcd7f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/worker.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ void CheckSpellingWorker::HandleOKCallback() {
4242
}
4343

4444
Local<Value> argv[] = { Nan::Null(), result };
45-
callback->Call(2, argv);
45+
Nan::AsyncResource resource("CheckSpellingWorker::HandleOKCallback");
46+
callback->Call(2, argv, &resource);
4647
}

0 commit comments

Comments
 (0)