Parent: #239
Add the selected-realm process object and the EventEmitter behavior required by Bun private ABI handlers.
Acceptance:
- Provide
on/addListener, once, off/removeListener, emit, listenerCount, and uncaught-exception capture callback accessors.
- Match listener registration order, duplicate listeners, once-before-call removal, snapshot iteration under reentrant add/remove, receiver/arguments, return values, and thrown-listener propagation.
- Keep listeners and capture callbacks precisely rooted, realm-local, hidden from ordinary reflection, and isolated across sibling globals.
- Add focused normal/no-GIL/leak coverage and document the foundation without claiming warning/rejection handlers complete.
Parent: #239
Add the selected-realm
processobject and the EventEmitter behavior required by Bun private ABI handlers.Acceptance:
on/addListener,once,off/removeListener,emit,listenerCount, and uncaught-exception capture callback accessors.