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
fix: free leaked WASM trees in native engine typeMap backfill
The typeMap backfill path in parseFilesAuto and backfillTypeMap called
wasmExtractSymbols but never freed the returned WASM tree objects.
Over repeated builds (benchmarks, watch mode), hundreds of trees
accumulated in WASM linear memory, eventually corrupting V8 state and
crashing the native addon with ACCESS_VIOLATION / has_exception().
Two fixes:
1. Free WASM trees immediately after extracting typeMap data in both
backfillTypeMap() and the parseFilesAuto() bulk backfill loop.
2. Skip backfill entirely for JS files — only TS/TSX have type
annotations that WASM can extract. The native engine already
handles JS `new Expr()` patterns, so re-parsing all JS files
with WASM was pure waste.
Closes#530
Impact: 2 functions changed, 2 affected
0 commit comments