SIGN IN SIGN UP
denoland / deno UNCLAIMED

A modern runtime for JavaScript and TypeScript.

0 0 16 Rust

perf(ext/node): gate node:http async resource entry (#34608)

## Summary
- Skips the per-request async-resource enter path in node:http request
handling when no async hooks are active and no async context mapping is
present.
- Still restores the request-entry async context snapshot on exit, so
`AsyncLocalStorage.enterWith()` inside a gated request cannot leak into
later request handlers.
- Preserves the existing async hooks and AsyncLocalStorage behavior by
falling back to the original request-resource path whenever those
observability mechanisms are active.
- Adds focused coverage for async context propagation, `enterWith()`
isolation in the gated path, and async resource observability through
node:http requests.

---------

Co-authored-by: Nathan Whitaker <nathan@deno.com>
N
nathanwhitbot committed
351d8fbfeec253d3b590f956e32f981adad91ce2
Parent: 61f96bf
Committed by GitHub <noreply@github.com> on 6/1/2026, 9:59:14 PM