Unverified Commit 35a8ff7e authored by Gabriel Schulhof's avatar Gabriel Schulhof Committed by Myles Borins
Browse files

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: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarKyle Farnung <kfarnung@microsoft.com>
Reviewed-By: default avatarTiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: default avatarYang Guo <yangguo@chromium.org>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarGus Caplan <me@gus.host>
parent c56aafd6
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment