Skip to content

Commit

Permalink
Fix deprecated callback
Browse files Browse the repository at this point in the history
The following warning.
```
../src/imagemagick.cc:764:36: warning: ‘v8::Local<v8::Value>
Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated
[-Wdeprecated-declarations]
     context->callback->Call(2, argv);
```
  • Loading branch information
abetomo committed Sep 19, 2018
1 parent da45a30 commit 08e5744
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/imagemagick.cc
Expand Up @@ -536,7 +536,8 @@ void GeneratedBlobAfter(uv_work_t* req) {

Nan::TryCatch try_catch; // don't quite see the necessity of this

context->callback->Call(2, argv);
Nan::AsyncResource resource("GeneratedBlobAfter");
context->callback->Call(2, argv, &resource);

delete context->callback;

Expand Down Expand Up @@ -760,7 +761,8 @@ void IdentifyAfter(uv_work_t* req) {

Nan::TryCatch try_catch; // don't quite see the necessity of this

context->callback->Call(2, argv);
Nan::AsyncResource resource("GeneratedBlobAfter");
context->callback->Call(2, argv, &resource);

delete context->callback;
delete context;
Expand Down

0 comments on commit 08e5744

Please sign in to comment.