ReviewOS

zig-utils/zig-js

ABI: implement rejection and uncaught-exception process dispatch

#242
Closed chris opened this 11 days ago ·
11 days ago

Parent: #239 Depends on: #240, #241

Implement the remaining Bun handled/unhandled rejection and uncaught-exception process hooks.

Acceptance:

  • Implement Bun__handleUnhandledRejection, Bun__emitHandledPromiseEvent, Bun__handleUncaughtException, and Bun__wrapUnhandledRejectionErrorForUncaughtException.
  • Match event arguments and return codes, monitor-before-handler ordering, capture-callback precedence, origin strings, warning policy, and fatal fallback boundaries.
  • Connect Promise rejection notification/late-handled tracking without duplicate events.
  • Preserve first exceptions, listener-throw behavior, sibling identity, and precise roots; add pinned fixtures and docs.
11 days ago

Completed on main in 730e887, b7c4d1c, and evidence commit 065ce4f. The process ABI now covers exact unhandled/late-handled Promise identity, duplicate suppression, monitor-before-handler ordering, capture precedence, pinned origins and return codes, the exact UnhandledPromiseRejection wrapper, and beforeExit/one-shot exit dispatch. Verification: focused process matrix 3/3 with zero leaks; Promise batch 18/18 with zero leaks; Home consumer 238/238; Home inventory 239/431 (192 pending); Bun inventory 233/421 (188 pending).

Sign in to comment on this issue.