Merge pull request #778 from voodootikigod/upgrade-nan

Upgrade nan
This commit is contained in:
Francis Gulotta 2016-05-01 18:42:45 -04:00
commit 7491b9b949
2 changed files with 3 additions and 6 deletions

View file

@ -53,7 +53,7 @@
"commander": "^2.9.0",
"debug": "^2.1.1",
"es6-promise": "^3.1.2",
"nan": "~2.2.1",
"nan": "^2.3.2",
"node-pre-gyp": "^0.6.26",
"object.assign": "^4.0.3"
},
@ -66,7 +66,6 @@
"grunt": "^1.0.0",
"grunt-mocha-test": "^0.12.7",
"gruntify-eslint": "^2.0.0",
"memwatch-next": "^0.3.0",
"mocha": "^2.4.5",
"node-pre-gyp-github": "^1.1.2",
"sandboxed-module": "^2.0.3",

View file

@ -61,12 +61,10 @@ void SerialportPoller::Init(Handle<Object> target) {
// Prototype
// SerialportPoller.close()
Nan::SetPrototypeTemplate(tpl, "close",
Nan::GetFunction(Nan::New<FunctionTemplate>(Close)).ToLocalChecked());
Nan::SetPrototypeMethod(tpl, "close", Close);
// SerialportPoller.start()
Nan::SetPrototypeTemplate(tpl, "start",
Nan::GetFunction(Nan::New<FunctionTemplate>(Start)).ToLocalChecked());
Nan::SetPrototypeMethod(tpl, "start", Start);
serialportpoller_constructor.Reset(tpl);