Avoid deprecation warnings

This commit is contained in:
fivdi 2016-05-01 22:21:04 +02:00 • committed by Francis Gulotta
parent 528dd8afeb
commit cb64745486

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);