node/test/js-native-api
Niels Martignène 1fca8baac1
node-api: copy external type tags when they are set
In order to adapt to V8 changes regarding storing private
properties on Externals, ExternalWrapper objects were introduced
in #51149.

However, this new code stores the type tag pointer and not the
128-bit value inside. This breaks some pre-existing code that
were making temporary tags. It also means that unloading the module
will cause existing External objects to have a tag pointer that
points nowhere (use-after-free bug).

Change ExternalWrapper to store tags by value to fix this regression.

PR-URL: https://github.com/nodejs/node/pull/52426
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-29 22:46:24 +02:00
..
2_function_arguments
3_callbacks
4_object_factory
5_function_factory
6_object_wrap
7_factory_wrap
8_passing_wrapped
test_array
test_bigint
test_cannot_run_js test: fix unreliable assumption in js-native-api/test_cannot_run_js 2024-03-01 01:44:55 +00:00
test_constructor
test_conversions
test_dataview
test_date
test_error
test_exception
test_finalizer node-api: segregate nogc APIs from rest via type system 2023-12-19 07:37:15 +00:00
test_function
test_general
test_handle_scope
test_instance_data
test_new_target
test_number
test_object node-api: copy external type tags when they are set 2024-04-29 22:46:24 +02:00
test_promise
test_properties
test_reference node-api: enable uncaught exceptions policy by default 2023-09-25 04:23:58 +00:00
test_reference_double_free
test_string node-api: move NAPI_EXPERIMENTAL definition to gyp file 2024-01-10 04:08:27 +00:00
test_symbol
test_typedarray
.gitignore
common-inl.h node-api: return napi_exception_pending on proxy handlers 2023-10-23 18:17:49 -04:00
common.h node-api: segregate nogc APIs from rest via type system 2023-12-19 07:37:15 +00:00
entry_point.h
testcfg.py