Add global unhandled promise rejection handling#35
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds global unhandled promise rejection handling to the V8 runtime wrapper. The main implementation sets up a SetPromiseRejectCallback that invokes a JavaScript function onUnhandledPromiseRejectionTracker with event type, promise, and rejection reason. The PR also includes extensive QuickJS source file additions (unicode generation tools, test configurations, etc.) which appear to be unrelated bulk updates rather than part of the promise rejection handling feature.
Key Changes
- Added promise rejection tracking via
SetPromiseRejectCallbackinjs_create_napi_env - Exposed promise rejection event constants (
__promiseUnhandledEvent,__promiseHandledEvent) to JavaScript - Included numerous QuickJS source files and test configurations (likely incidental)
Reviewed changes
Copilot reviewed 35 out of 50 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test-app/runtime/src/main/cpp/napi/v8/jsr.cpp | Main implementation of promise rejection callback and global setup |
| test-app/runtime/src/main/cpp/napi/quickjs/source/*.{c,h,js} | QuickJS source additions (unicode_gen, test configs, etc.) - appear unrelated to PR purpose |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Closes #24