Partially revert "[node] Fix memory test hanging after GlyphAtlas refactoring (#8394)"
This reverts commit 5700c99e55.
This commit is contained in:
@@ -122,19 +122,9 @@ 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_) {
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
|
||||
#include <mbgl/storage/resource.hpp>
|
||||
#include <mbgl/storage/file_source.hpp>
|
||||
#include <mbgl/util/async_task.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace node_mbgl {
|
||||
|
||||
@@ -38,12 +35,9 @@ public:
|
||||
void Execute();
|
||||
|
||||
private:
|
||||
void doExecute();
|
||||
|
||||
NodeMap* target;
|
||||
mbgl::FileSource::Callback callback;
|
||||
NodeAsyncRequest* asyncRequest = nullptr;
|
||||
std::unique_ptr<mbgl::util::AsyncTask> asyncExecute;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user