Skip to content

Commit

Permalink
src: make compatible with node.js v12.x
Browse files Browse the repository at this point in the history
Replace a removed V8 API with its NAN equivalent.

Fixes: #127
  • Loading branch information
bnoordhuis committed Apr 26, 2019
1 parent 25fa373 commit 6f2c53b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 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": {
Expand Down
8 changes: 2 additions & 6 deletions src/heapdump.cc
Expand Up @@ -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<v8::FunctionTemplate>(Configure)->GetFunction());
Nan::Set(target,
Nan::New("writeSnapshot").ToLocalChecked(),
Nan::New<v8::FunctionTemplate>(WriteSnapshot)->GetFunction());
Nan::SetMethod(target, "configure", Configure);
Nan::SetMethod(target, "writeSnapshot", WriteSnapshot);
}

NODE_MODULE(addon, Initialize)
Expand Down

0 comments on commit 6f2c53b

Please sign in to comment.