You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
class X extends AsyncLocalStorage has the same indirect-heritage defect as #10453, blocked on perry-runtime not being able to reach perry-stdlib's init helper #10625
PR #10621 fixed class X extends AsyncResource for every syntax that reaches the value indirectly (local alias,
namespace member, CJS destructured require()) by generalizing bound_native_callable_module_and_method in crates/perry-runtime/src/object/global_this/fetch_globals.rs to recognize ("async_hooks", "AsyncResource")
and route to js_async_resource_subclass_init.
AsyncLocalStorage has the same defect shape and was deliberately left unfixed, for a structural reason: its
init helper lives in perry-stdlib, and perry-runtime cannot depend on perry-stdlib. So the same one-line
recognition arm is not available without either moving the helper down into perry-runtime or introducing an
indirection (a registration hook the stdlib installs at startup, which is how other cross-crate surfaces are
wired).
Deciding which of those two shapes is right is the actual work here; the detection half is already solved and
can be copied from #10621's diff.
Note AsyncLocalStorage is not a stub — real tracking across await/microtasks/timers landed in #788 — so this
is about subclassing it, not about its behaviour.
Activity