Files
scriptc/packages/runtime
Chris Tate 6b53ab8570 Reject events.once when a newListener listener throws
When a 'newListener' listener threw while events.once registered its
listeners, the exception escaped the call, the 'error' listener's closure
was never registered or released, and the shared state and its promise
leaked with it. Node registers both listeners inside the promise's
executor: the throw rejects the returned promise, and the listener whose
announcement threw is not added (the event's listener stays when only the
'error' announcement throws).

scr_events_once now takes the pending exception, takes back the listener
whose announcement threw without a 'removeListener' event, releases the
'error' closure when it was never registered, and rejects the promise
with the exception.
2026-10-15 20:54:30 -05:00
..
2026-07-22 18:08:04 -05:00
2026-10-15 11:23:16 -05:00