node/test/js-native-api
Michael Dawson 5a0efa05d2
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
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-11-24 08:15:35 -05:00
..
2_function_arguments test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
3_callbacks test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
4_object_factory test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
5_function_factory test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
6_object_wrap test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
7_factory_wrap test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
8_passing_wrapped test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
test_array test: prepare for consistent comma-dangle lint rule 2021-04-01 23:14:29 -07:00
test_bigint test: suppress compiler warning in test_bigint 2021-10-04 20:32:16 +02:00
test_constructor test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_conversions test: avoid deep comparisons with literals 2022-02-24 21:57:21 -05:00
test_dataview test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_date test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_error src,doc: add SyntaxError napi support 2022-01-31 22:53:50 -05:00
test_exception test: pass data into napi_create_external 2022-07-31 09:43:33 +02:00
test_function node-api: handle pending exception in cb wrapper 2021-08-16 16:34:54 -04:00
test_general node-api: handle no support for external buffers 2022-11-24 08:15:35 -05:00
test_handle_scope test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_instance_data test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_new_target test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
test_number tools: enable ESLint no-loss-of-precision rule 2022-01-31 23:55:01 -05:00
test_object src: fix napi_check_object_type_tag() 2022-07-31 16:57:16 +02:00
test_promise test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_properties node-api: add node_api_symbol_for() 2022-04-20 20:34:20 -04:00
test_reference node-api: emit uncaught-exception on unhandled tsfn callbacks 2022-07-31 09:44:36 +02:00
test_reference_double_free test: verify napi_remove_wrap with napi_delete_reference 2022-10-11 14:45:28 -05:00
test_string node-api: avoid crashing on passed-in null string 2021-06-12 19:39:26 -07:00
test_symbol test: replace commented out expectations with tests 2022-03-14 09:32:09 -04:00
test_typedarray test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
.gitignore
common.c test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
common.h node-api,src: fix module registration in MSVC C++ 2022-07-07 11:02:05 -04:00
entry_point.c
testcfg.py