From 572fd278f0351557f97bc17f152cee210635c1ba Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 31 Mar 2016 17:23:04 -0700 Subject: [PATCH] call v8 function directly (fixes 2 of 3 failing tests) --- src/handler.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/handler.cpp b/src/handler.cpp index 3c7103e..54c5b9a 100644 --- a/src/handler.cpp +++ b/src/handler.cpp @@ -159,15 +159,14 @@ namespace node_osmium { return; } v8::Local argv[1] = { new_external(entity) }; - Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(function), 1, argv); + Nan::New(function)->Call(Nan::GetCurrentContext()->Global(), 1, argv); } void call_callback(const Nan::Persistent& function) { if (function.IsEmpty()) { return; } - - Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(function), 0, nullptr); + Nan::New(function)->Call(Nan::GetCurrentContext()->Global(), 0, nullptr); } void JSHandler::dispatch_entity(const osmium::OSMEntity& entity) const {