-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
mbgl::FileSource::Callback fileSourceCallback_) | ||
: AsyncWorker(new Nan::Callback([&] { | ||
Nan::EscapableHandleScope scope; | ||
return scope.Escape(Nan::New<v8::Function>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that v8::Function
has its lifetime bound to the context.
0089a44
to
76427ec
Compare
This pull request now implements an alternative to #5527 that solves the This is roughly equivalent to creating an The problem here is that attaching data (like a reference to the
According to the V8 Embedder's Guide, this shouldn't be TOO costly, and has been benchmarked to verify that performance is acceptable. Changing the API to /cc @miccolis @bsudekum @tmpsantos @brunoabinader @jfirebaugh |
… NodeMap::request
webp support in memory test
drop NodeRequest::Create, move MakeCallback to NodeRequest::Execute rework Respond -> HandleCallback modern NAN style updates
This looks good to me. I wonder what the reason is for the v8 design decision to make FunctionTemplates non-garbage collectable... pretty crazy that you have to make an entire context just to get a temporary function. |
Stupid fancy refactored code still fails leak test. Will investigate further tomorrow.
/cc @tmpsantos