node/doc/api
Gabriel Schulhof cc7ec889e8 n-api: support type-tagging objects
`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>
2020-07-31 18:30:30 -07:00
..
addons.md src,doc,test: remove String::New default parameter 2020-07-14 15:13:34 +02:00
assert.md doc: fix typo in assert.md 2020-07-16 00:26:26 +02:00
async_hooks.md doc: improve async_hooks asynchronous context example 2020-07-03 13:24:39 -07:00
buffer.md doc: buffer documentation improvements 2020-07-14 15:11:31 +02:00
child_process.md doc: reword warnings about sockets passed to subprocesses 2020-07-11 21:03:03 -07:00
cli.md src: allow setting a dir for all diagnostic output 2020-07-20 18:20:18 +02:00
cluster.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
console.md console: document the behavior of console.assert() 2020-07-28 23:40:43 +08:00
crypto.md doc: add a reference to the list of OpenSSL flags. 2020-07-03 14:44:21 -07:00
debugger.md doc: use sentence-case for headings in docs 2020-06-19 08:09:05 -07:00
deprecations.md 2020-07-21, Version 14.6.0 (Current) 2020-07-21 17:45:12 -04:00
dgram.md dgram: add IPv6 scope id suffix to received udp6 dgrams 2020-07-21 11:59:50 +01:00
dns.md 2020-07-22, Version 12.18.3 'Erbium' (LTS) 2020-07-22 09:54:26 -07:00
documentation.md doc: use sentence-case for headings in docs 2020-06-19 08:09:05 -07:00
domain.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
embedding.md doc: use sentence-case for headings in docs 2020-06-19 08:09:05 -07:00
errors.md doc: strengthen suggestion in errors.md 2020-07-18 14:41:24 -07:00
esm.md doc: clarify conditional exports guidance 2020-07-14 08:04:49 -07:00
events.md doc: add note about multiple sync events and once 2020-07-09 07:31:54 -07:00
fs.md doc: use correct identifier for callback argument 2020-07-19 07:16:21 -07:00
globals.md doc: use sentence-case for headings in docs 2020-06-19 08:09:05 -07:00
http2.md http2: add support for sensitive headers 2020-07-16 00:25:47 +02:00
http.md http: don't write error to socket 2020-07-25 09:59:41 +02:00
https.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
index.md doc: match link text in index to doc headline 2020-07-23 06:38:30 -07:00
inspector.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
intl.md doc: use sentence-case for headings in docs 2020-06-19 08:09:05 -07:00
modules.md 2020-07-21, Version 14.6.0 (Current) 2020-07-21 17:45:12 -04:00
n-api.md n-api: support type-tagging objects 2020-07-31 18:30:30 -07:00
net.md 2020-07-21, Version 14.6.0 (Current) 2020-07-21 17:45:12 -04:00
os.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
path.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
perf_hooks.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
policy.md doc: use sentence-case for headings in docs 2020-06-19 08:09:05 -07:00
process.md doc: replace http to https of link urls 2020-07-06 07:03:05 -07:00
punycode.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
querystring.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
quic.md quic: refactor ocsp to use async function rather than event/callback 2020-07-27 13:33:14 -07:00
readline.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
repl.md 2020-06-30, Version 14.5.0 (Current) 2020-06-30 15:27:43 -07:00
report.md doc: use sentence-case for headings in docs 2020-06-19 08:09:05 -07:00
stream.md stream: add promises version to utility functions 2020-07-09 09:12:19 +02:00
string_decoder.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
synopsis.md doc: use sentence-case for headings in docs 2020-06-19 08:09:05 -07:00
timers.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
tls.md doc: fix typos in n-api, tls and worker_threads 2020-07-20 18:28:01 +02:00
tracing.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
tty.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
url.md doc: document security issues with url.parse() 2020-07-09 07:21:04 -07:00
util.md doc: util.debuglog callback 2020-07-03 15:01:10 -07:00
v8.md doc: add dynamic source code links 2020-06-26 10:25:14 -07:00
vm.md 2020-07-21, Version 14.6.0 (Current) 2020-07-21 17:45:12 -04:00
wasi.md 2020-07-21, Version 14.6.0 (Current) 2020-07-21 17:45:12 -04:00
worker_threads.md worker: set trackUnmanagedFds to true by default 2020-07-22 07:30:32 -07:00
zlib.md 2020-06-30, Version 14.5.0 (Current) 2020-06-30 15:27:43 -07:00