Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: create result String/Buffer in native code #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ronag
Copy link
Member

@ronag ronag commented Aug 26, 2024

@ronag ronag force-pushed the node-buffer branch 7 times, most recently from ec3dfd8 to 238f0ee Compare August 26, 2024 14:29
// overhead of registering lots of finalizers which is super slow.
// https://github.com/nodejs/node/issues/53804
auto data = std::make_unique<std::vector<uint8_t>>(std::move(state.data));
NAPI_STATUS_RETURN(napi_create_external_arraybuffer(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note that in Node.js implementation, napi_create_external_arraybuffer is an alias for napi_create_external_buffer: https://github.com/nodejs/node/blob/main/src/js_native_api_v8.cc#L3027-L3041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants