[node] move to Nan 2.10.0

This commit is contained in:
Konstantin Käfer
2018-04-20 16:40:17 +03:00
parent d5aff7182d
commit 973aa963f9
5 changed files with 34 additions and 15 deletions

View File

@@ -124,7 +124,8 @@ void NodeRequest::HandleCallback(const Nan::FunctionCallbackInfo<v8::Value>& inf
void NodeRequest::Execute() {
v8::Local<v8::Value> argv[] = { handle() };
Nan::MakeCallback(Nan::To<v8::Object>(target->handle()->GetInternalField(1)).ToLocalChecked(), "request", 1, argv);
Nan::AsyncResource res("mbgl:execute");
res.runInAsyncScope(Nan::To<v8::Object>(target->handle()->GetInternalField(1)).ToLocalChecked(), "request", 1, argv);
}
NodeRequest::NodeAsyncRequest::NodeAsyncRequest(NodeRequest* request_) : request(request_) {