Port the domain module from createHook (async_hooks) to AsyncLocalStorage using the AsyncContextFrame-based implementation. Key changes: - Use AsyncLocalStorage for domain context propagation instead of async_hooks.createHook() - Lazy initialization that triggers AsyncContextFrame prototype swap on first domain use - Use enterWith instead of ALS.run() so domain context is NOT automatically restored on exception - this matches the original domain.run() behavior where exit() only runs on success - Add ERR_ASYNC_RESOURCE_DOMAIN_REMOVED error for AsyncResource.domain - Update DEP0097 to End-of-Life status - Remove tests that relied on the removed MakeCallback domain property The domain module now uses the AsyncContextFrame version of AsyncLocalStorage directly for proper context propagation across async boundaries. Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/61095 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> |
||
|---|---|---|
| .. | ||
| 1_hello_world | ||
| test_async | ||
| test_async_cleanup_hook | ||
| test_async_context | ||
| test_buffer | ||
| test_callback_scope | ||
| test_cleanup_hook | ||
| test_env_teardown_gc | ||
| test_exception | ||
| test_fatal | ||
| test_fatal_exception | ||
| test_general | ||
| test_init_order | ||
| test_instance_data | ||
| test_make_callback | ||
| test_make_callback_recurse | ||
| test_null_init | ||
| test_reference_by_node_api_version | ||
| test_sea_addon | ||
| test_threadsafe_function | ||
| test_threadsafe_function_abort | ||
| test_threadsafe_function_shutdown | ||
| test_uv_loop | ||
| test_uv_threadpool_size | ||
| test_worker_buffer_callback | ||
| test_worker_terminate | ||
| test_worker_terminate_finalization | ||
| .gitignore | ||
| node-api.status | ||
| testcfg.py | ||