n-api: create functions directly
Avoid using `v8::FunctionTemplate::New()` when using `v8::Function::New()` suffices. This ensures that individual functions can be gc-ed and that functions can be created dynamically without running out of memory. Backport-PR-URL: https://github.com/nodejs/node/pull/22202 PR-URL: https://github.com/nodejs/node/pull/21688 Reviewed-By:Anna Henningsen <anna@addaleax.net> Reviewed-By:
Kyle Farnung <kfarnung@microsoft.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
Yang Guo <yangguo@chromium.org> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
parent
c56aafd6
Please register or sign in to comment