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> |
||
|---|---|---|
| .. | ||
| async-cleanup-hook | ||
| async-hello-world | ||
| async-hooks-id | ||
| async-resource | ||
| buffer-free-callback | ||
| callback-scope | ||
| cppgc-object | ||
| dlopen-ping-pong | ||
| errno-exception | ||
| esm | ||
| esm-export-default | ||
| esm-export-primitive | ||
| force-context-aware | ||
| heap-profiler | ||
| hello-world | ||
| hello-world-2 | ||
| hello-world-function-export | ||
| load-long-path | ||
| make-callback | ||
| make-callback-recurse | ||
| new-context-inspector | ||
| new-isolate-addon | ||
| new-target | ||
| no-addons | ||
| node-module-version | ||
| non-node-context | ||
| not-a-binding | ||
| null-buffer-neuter | ||
| openssl-binding | ||
| openssl-client-cert-engine | ||
| openssl-get-ssl-ctx | ||
| openssl-key-engine | ||
| openssl-providers | ||
| openssl-test-engine | ||
| parse-encoding | ||
| register-signal-handler | ||
| repl-domain-abort | ||
| report-api | ||
| report-fatalerror | ||
| request-interrupt | ||
| stringbytes-external-exceed-max | ||
| symlinked-module | ||
| uv-handle-leak | ||
| uv-thread-name | ||
| worker-addon | ||
| worker-addon-exit | ||
| worker-buffer-callback | ||
| zlib-binding | ||
| .gitignore | ||
| addons.status | ||
| common.gypi | ||
| testcfg.py | ||