Files
bun.sh/test/internal/ban-limits.json
Dylan Conway fc4624c672 fix(node:vm): propagate async context tracking flag to NodeVMGlobalObject (#26542)
When a `SyntheticModule` callback was wrapped in an `AsyncContextFrame`
on the main globalObject (where async context tracking is enabled),
evaluating it on a `NodeVMGlobalObject` would crash because the tracking
flag wasn't propagated.

`AsyncContextFrame::call` checks `isAsyncContextTrackingEnabled()` to
decide whether to unwrap the frame — without the flag, it takes the fast
path and tries to call the `AsyncContextFrame` wrapper directly, which
is not callable.

The async context data (`m_asyncContextData`) was already shared between
parent and `NodeVMGlobalObject`, but the tracking flag was missing. This
adds propagation of `isAsyncContextTrackingEnabled` alongside the data.

**Repro:** `react-email` v5.2.5 preview server crashes when rendering a
template because it imports `node:async_hooks` (enabling async context
tracking) and uses `node:vm` `SyntheticModule` for module evaluation.

Fixes #26540

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-28 21:40:55 -08:00

47 lines
1.2 KiB
JSON

{
" != undefined": 0,
" == undefined": 0,
" catch bun.outOfMemory()": 0,
"!= alloc.ptr": 0,
"!= allocator.ptr": 0,
".arguments_old(": 263,
".jsBoolean(false)": 0,
".jsBoolean(true)": 0,
".stdDir()": 42,
".stdFile()": 16,
"// autofix": 148,
": [^=]+= undefined,$": 256,
"== alloc.ptr": 0,
"== allocator.ptr": 0,
"@import(\"bun\").": 0,
"EXCEPTION_ASSERT(!scope.exception())": 0,
"JSValue.false": 0,
"JSValue.true": 0,
"TODO: properly propagate exception upwards": 114,
"alloc.ptr !=": 0,
"alloc.ptr ==": 0,
"allocator.ptr !=": 1,
"allocator.ptr ==": 0,
"global.hasException": 28,
"globalObject.hasException": 47,
"globalThis.hasException": 123,
"std.StringArrayHashMap(": 1,
"std.StringArrayHashMapUnmanaged(": 11,
"std.StringHashMap(": 0,
"std.StringHashMapUnmanaged(": 0,
"std.Thread.Mutex": 1,
"std.debug.assert": 27,
"std.debug.dumpStackTrace": 0,
"std.debug.print": 0,
"std.enums.tagName(": 2,
"std.fs.Dir": 164,
"std.fs.File": 93,
"std.fs.cwd": 110,
"std.fs.openFileAbsolute": 10,
"std.log": 1,
"std.mem.indexOfAny(u8": 0,
"std.unicode": 27,
"undefined != ": 0,
"undefined == ": 0,
"usingnamespace": 0
}