Parent: #134
Related: #140, #163, #164, #236
Build the process-warning/event foundation required to implement Bun's pending unhandled-rejection and uncaught-exception private ABI as observable runtime behavior rather than isolated no-ops.
Scope
Bun__Process__emitWarning
Bun__promises__emitUnhandledRejectionWarning
Bun__emitHandledPromiseEvent
Bun__handleUnhandledRejection
Bun__handleUncaughtException
Bun__wrapUnhandledRejectionErrorForUncaughtException
- the directly required
Process__dispatch* event hooks
Acceptance
- Add a selected-realm process event/warning model with listener ordering, once/removal behavior, exact arguments, and reentrant mutation semantics needed by the pinned consumers.
- Reproduce Bun's two-warning unhandled-rejection path, including own-
stack classification, throwing stack access, pure fallback stringification, warning name/stack descriptors, and exception clearing between emissions.
- Implement handled/unhandled rejection and uncaught-exception return codes, capture-callback precedence, monitor/listener ordering, origin strings, and fatal fallback boundaries.
- Preserve Promise/reason identity, sibling-VM behavior, first-pending exceptions, and deterministic behavior when listeners throw.
- Add focused runtime/differential fixtures and update both pinned inventories, README/docs evidence, and parent issues from committed artifacts.
This issue is intentionally a cluster: none of these exports should be counted complete until their shared process event semantics exist.
Child issues
Parent: #134
Related: #140, #163, #164, #236
Build the process-warning/event foundation required to implement Bun's pending unhandled-rejection and uncaught-exception private ABI as observable runtime behavior rather than isolated no-ops.
Scope
Bun__Process__emitWarningBun__promises__emitUnhandledRejectionWarningBun__emitHandledPromiseEventBun__handleUnhandledRejectionBun__handleUncaughtExceptionBun__wrapUnhandledRejectionErrorForUncaughtExceptionProcess__dispatch*event hooksAcceptance
stackclassification, throwing stack access, pure fallback stringification, warning name/stack descriptors, and exception clearing between emissions.This issue is intentionally a cluster: none of these exports should be counted complete until their shared process event semantics exist.
Child issues