[node] Fix memory test hanging after GlyphAtlas refactoring (#8394)
Replies are assumed to be asynchronous after e3500c1f79.
This commit is contained in:
committed by
Bobby Sudekum
parent
bd05bcfe9f
commit
5700c99e55
@@ -122,9 +122,19 @@ void NodeRequest::HandleCallback(const Nan::FunctionCallbackInfo<v8::Value>& inf
|
||||
}
|
||||
|
||||
void NodeRequest::Execute() {
|
||||
asyncExecute = std::make_unique<mbgl::util::AsyncTask>([this] { doExecute(); Unref(); });
|
||||
asyncExecute->send();
|
||||
|
||||
Ref();
|
||||
}
|
||||
|
||||
void NodeRequest::doExecute() {
|
||||
Nan::HandleScope scope;
|
||||
|
||||
v8::Local<v8::Value> argv[] = { handle() };
|
||||
|
||||
Nan::MakeCallback(Nan::To<v8::Object>(target->handle()->GetInternalField(1)).ToLocalChecked(), "request", 1, argv);
|
||||
asyncExecute.reset();
|
||||
}
|
||||
|
||||
NodeRequest::NodeAsyncRequest::NodeAsyncRequest(NodeRequest* request_) : request(request_) {
|
||||
|
||||
Reference in New Issue
Block a user