node/test/node-api
Michael Dawson 2dbeb889f6
node-api: handle no support for external buffers
Refs: https://github.com/electron/electron/issues/35801
Refs: https://github.com/nodejs/abi-stable-node/issues/441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/45181
Backport-PR-URL: https://github.com/nodejs/node/pull/45616
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-12-07 08:49:39 -05:00
..
1_hello_world
test_async test: prepare for consistent comma-dangle lint rule 2021-09-04 12:24:57 +02:00
test_async_cleanup_hook node-api: define version 8 2021-04-25 07:18:11 +02:00
test_async_context n-api: fix test_async_context warnings 2020-12-15 20:15:25 +00:00
test_buffer buffer,n-api: release external buffers from BackingStore callback 2020-05-16 12:52:51 -07:00
test_callback_scope test: convert most N-API tests from C++ to C 2020-08-10 21:21:50 -07:00
test_cleanup_hook test: convert most N-API tests from C++ to C 2020-08-10 21:21:50 -07:00
test_env_teardown_gc node-api: stop ref gc during environment teardown 2021-04-26 12:42:24 +02:00
test_exception
test_fatal report: generates report on threads with no isolates 2021-09-03 14:38:33 +02:00
test_fatal_exception
test_general node-api: handle no support for external buffers 2022-12-07 08:49:39 -05:00
test_instance_data module: deprecate module.parent 2020-07-16 17:09:13 -04:00
test_make_callback n-api: napi_make_callback emit async init with resource of async_context 2020-12-15 20:15:06 +00:00
test_make_callback_recurse test: convert most N-API tests from C++ to C 2020-08-10 21:21:50 -07:00
test_null_init
test_policy test: prepare for consistent comma-dangle lint rule 2021-09-04 12:24:57 +02:00
test_threadsafe_function test,doc,lib: adjust object literal newlines for lint rule 2021-06-11 09:30:18 +02:00
test_uv_loop
test_worker_buffer_callback test: fix out-of-bound reads from invalid sizeof usage 2020-05-04 14:23:26 +02:00
test_worker_terminate
test_worker_terminate_finalization n-api: unlink reference during its destructor 2020-12-15 20:15:09 +00:00
.gitignore
node-api.status
testcfg.py