node/test/js-native-api/test_object
Niels Martignène c1bbc5d569
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-15 17:18:37 +00:00
..
binding.gyp node-api: return napi_exception_pending on proxy handlers 2023-10-23 18:17:49 -04:00
test_exceptions.c node-api: return napi_exception_pending on proxy handlers 2023-10-23 18:17:49 -04:00
test_exceptions.js node-api: return napi_exception_pending on proxy handlers 2023-10-23 18:17:49 -04:00
test_null.c test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_null.h test: cover property n-api null cases 2020-01-25 21:23:05 -08:00
test_null.js test: add trailing commas in test/js-native-api 2023-02-03 17:12:18 +01:00
test_object.c node-api: copy external type tags when they are set 2024-04-15 17:18:37 +00:00
test.js node-api: extend type-tagging to externals 2023-03-22 04:47:08 +00:00