Skip to content

Conversation

@ammarahm-ed
Copy link
Collaborator

Closes #24

Copilot AI review requested due to automatic review settings November 25, 2025 09:00
@ammarahm-ed ammarahm-ed merged commit 2029167 into main Nov 25, 2025
7 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SetPromiseRejectCallback in js_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Uncaught Promise Exceptions

2 participants