diff --git a/package.json b/package.json index d60d298..bd2b3c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "heapdump", - "version": "0.3.12", + "version": "0.3.13", "description": "Make a dump of the V8 heap for later inspection.", "homepage": "https://github.com/bnoordhuis/node-heapdump", "author": { diff --git a/src/heapdump.cc b/src/heapdump.cc index 426d19f..096d644 100644 --- a/src/heapdump.cc +++ b/src/heapdump.cc @@ -123,12 +123,8 @@ NAN_MODULE_INIT(Initialize) { Nan::Set(target, Nan::New("kSignalFlag").ToLocalChecked(), Nan::New(kSignalFlag)); - Nan::Set(target, - Nan::New("configure").ToLocalChecked(), - Nan::New(Configure)->GetFunction()); - Nan::Set(target, - Nan::New("writeSnapshot").ToLocalChecked(), - Nan::New(WriteSnapshot)->GetFunction()); + Nan::SetMethod(target, "configure", Configure); + Nan::SetMethod(target, "writeSnapshot", WriteSnapshot); } NODE_MODULE(addon, Initialize)