mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
ad3ebed046
Unlike JS-only modules, native add-ons are always associated with a dynamic shared object from which they are loaded. Being able to retrieve its absolute path is important to native-only add-ons, i.e. add-ons that are not themselves being loaded from a JS-only module located in the same package as the native add-on itself. Currently, the file name is obtained at environment construction time from the JS `module.filename`. Nevertheless, the presence of `module` is not required, because the file name could also be passed in via a private property added onto `exports` from the `process.dlopen` binding. As an attempt at future-proofing, the file name is provided as a URL, i.e. prefixed with the `file://` protocol. Fixes: https://github.com/nodejs/node-addon-api/issues/449 PR-URL: https://github.com/nodejs/node/pull/37195 Co-authored-by: Michael Dawson <mdawson@devrus.com> Reviewed-By: Michael Dawson <midawson@redhat.com> |
||
---|---|---|
.. | ||
1_hello_world | ||
test_async | ||
test_async_cleanup_hook | ||
test_async_context | ||
test_buffer | ||
test_callback_scope | ||
test_cleanup_hook | ||
test_exception | ||
test_fatal | ||
test_fatal_exception | ||
test_general | ||
test_instance_data | ||
test_make_callback | ||
test_make_callback_recurse | ||
test_null_init | ||
test_policy | ||
test_threadsafe_function | ||
test_uv_loop | ||
test_worker_buffer_callback | ||
test_worker_terminate | ||
test_worker_terminate_finalization | ||
.gitignore | ||
node-api.status | ||
testcfg.py |