Skip to content

QuickJS: fix unhandled rejection tracking in reused contexts#1087

Merged
xeioex merged 1 commit into
nginx:masterfrom
xeioex:unhandled_rejection_in_reused_ctx
Jul 3, 2026
Merged

QuickJS: fix unhandled rejection tracking in reused contexts#1087
xeioex merged 1 commit into
nginx:masterfrom
xeioex:unhandled_rejection_in_reused_ctx

Conversation

@xeioex

@xeioex xeioex commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

ngx_qjs_destroy() unregisters the host promise rejection tracker on the runtime, but ngx_qjs_clone() did not re-register it when a context was popped from the reuse queue. Every request served by a reused context then silently dropped unhandled rejections instead of reporting them, which also defeated any caller relying on ctx->rejected_promises.

ngx_qjs_destroy() unregisters the host promise rejection tracker on the
runtime, but ngx_qjs_clone() did not re-register it when a context was
popped from the reuse queue.  Every request served by a reused context
then silently dropped unhandled rejections instead of reporting them,
which also defeated any caller relying on ctx->rejected_promises.

@VadimZhestikov VadimZhestikov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

@github-project-automation github-project-automation Bot moved this from New to In Review in NGINX OSS Unified Workspace Jul 3, 2026
@xeioex xeioex merged commit e7eac45 into nginx:master Jul 3, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in NGINX OSS Unified Workspace Jul 3, 2026
@xeioex xeioex deleted the unhandled_rejection_in_reused_ctx branch July 3, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants