Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 572fd27

Browse files
author
Dane Springmeyer
committed
call v8 function directly (fixes 2 of 3 failing tests)
1 parent b5f3392 commit 572fd27

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/handler.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,14 @@ namespace node_osmium {
159159
return;
160160
}
161161
v8::Local<v8::Value> argv[1] = { new_external<TWrapped>(entity) };
162-
Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(function), 1, argv);
162+
Nan::New(function)->Call(Nan::GetCurrentContext()->Global(), 1, argv);
163163
}
164164

165165
void call_callback(const Nan::Persistent<v8::Function>& function) {
166166
if (function.IsEmpty()) {
167167
return;
168168
}
169-
170-
Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(function), 0, nullptr);
169+
Nan::New(function)->Call(Nan::GetCurrentContext()->Global(), 0, nullptr);
171170
}
172171

173172
void JSHandler::dispatch_entity(const osmium::OSMEntity& entity) const {

0 commit comments

Comments
 (0)