qwen-code/patches
ChiGao 7f99a1f298
fix(cli): patch ink to clear staticNode on indirect subtree removal (#7816)
When a component containing <Static> is unmounted (e.g. transcriptFreeze
toggling <App/> off), the reconciler removes the ancestor and
freeRecursive() frees the static node Yoga WASM memory. The existing
identity check (staticNode === removeNode) only catches direct removal
of <Static> itself -- removing an ancestor leaves a dangling staticNode
reference. The next render then calls getComputedWidth() on freed WASM
memory, crashing with RuntimeError: memory access out of bounds.

Add clearStaticNodeIfContained() which walks up the parent chain from
staticNode to detect ancestor removal, and null out removeNode.yogaNode
after cleanup so stale JS references short-circuit on ?.yogaNode.

Fixes #6820

Co-authored-by: 秦奇 <gary.gq@alibaba-inc.com>
2026-07-28 10:05:30 +00:00
..
ink+7.0.3.patch fix(cli): patch ink to clear staticNode on indirect subtree removal (#7816) 2026-07-28 10:05:30 +00:00