mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 14:27:26 +00:00
happy-dom 20.9.0 stores each MutationObserver delivery callback only as a WeakRef (MutationObserverListener.js:29) with no strong referent, so any GC pass between observe() and a mutation silently kills the observer. startOffCanvasIndicatorRefresh is dirty-flag driven off that observer, so under full-suite memory pressure the off->on indicator removal flaked (passed in isolation, failed ~2/3 full runs; reproduced deterministically with a forced gc()). Swap globalThis.WeakRef for a strong-holding StrongRef for this file only — the real MutationObserver path stays fully exercised, just immune to GC. Verified: 3 consecutive full-suite runs at exactly the 18 pre-existing env failures with this file green.