mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
cc7ec889e8
`napi_instanceof()` is insufficient for reliably establishing the data type to which a pointer stored with `napi_wrap()` or `napi_create_external()` inside a JavaScript object points. Thus, we need a way to "mark" an object with a value that, when later retrieved, can unambiguously tell us whether it is safe to cast the pointer stored inside it to a certain structure. Such a check must survive loading/unloading/multiple instances of an addon, so we use UUIDs chosen *a priori*. Fixes: https://github.com/nodejs/node/issues/28164 Co-authored-by: Anna Henningsen <github@addaleax.net> PR-URL: https://github.com/nodejs/node/pull/28237 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> |
||
---|---|---|
.. | ||
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_constructor | ||
test_conversions | ||
test_dataview | ||
test_date | ||
test_error | ||
test_exception | ||
test_function | ||
test_general | ||
test_handle_scope | ||
test_instance_data | ||
test_new_target | ||
test_number | ||
test_object | ||
test_promise | ||
test_properties | ||
test_reference | ||
test_string | ||
test_symbol | ||
test_typedarray | ||
.gitignore | ||
common.c | ||
common.h | ||
entry_point.c | ||
testcfg.py |