node/test/js-native-api/test_object
Niels Martignène 0a225a4b40 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-05-03 08:30:31 +02:00
..
binding.gyp test: avoid copying test source files 2023-09-27 22:30:07 -04:00
test_null.c
test_null.h
test_null.js
test_object.c node-api: copy external type tags when they are set 2024-05-03 08:30:31 +02:00
test.js node-api: extend type-tagging to externals 2023-03-22 04:47:08 +00:00