Skip to content

Commit

Permalink
fix 1 of the 2 Nan::Callback::Call deprecation warnings
Browse files Browse the repository at this point in the history
Looks like the Nan::Callback::Call() API deprecated bare calls that
don't pass a new Nan::AsyncResource().  Luckily, in this case we were
already subclassing Nan::AsyncWorker, which has a member named
`async_resource` so all we have to do is explicitly pass this along.

I wonder if Nan should just do this for me? *hmm*

Bug #209
  • Loading branch information
nickdesaulniers committed Jul 1, 2019
1 parent b8fba45 commit 153f3b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_nanomsg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class NanomsgDeviceWorker : public Nan::AsyncWorker {

Local<Value> argv[] = { Nan::New<Number>(err) };

callback->Call(1, argv);
callback->Call(1, argv, async_resource);
};

private:
Expand Down

0 comments on commit 153f3b8

Please sign in to comment.