Files
orca/src
Hayden FlinnerandNeil 3036ed0df1 fix(window): cap main-window listeners at 30 and fix two 'destroyed' listener leaks (#42595)
The main BrowserWindow and its webContents logged MaxListenersExceededWarning on
every boot because normal subsystem fan-out exceeds Node's default of 10. Raise
the per-event warning threshold to 30 so the warning only fires on real leaks.

Fix the two leaks that the warning was masking:
- plugin panel push: each open added a 'destroyed' listener to the sender and
  close never removed it. Track the release hook per session (via
  addFanoutListener) and release it on close.
- pending VM checkouts: the drop handler removed its 'render-process-gone'
  listener but not its 'destroyed' listener, so each renderer crash leaked one.

Fixes #42594

Co-authored-by: Neil <neil@stably.ai>
2026-11-14 20:50:05 -08:00
..