Skip to content

feat: port test_object test_exceptions to CTS - #81

Open
bavulapati wants to merge 6 commits into
nodejs:mainfrom
bavulapati:feat/port-test-object-exceptions
Open

feat: port test_object test_exceptions to CTS#81
bavulapati wants to merge 6 commits into
nodejs:mainfrom
bavulapati:feat/port-test-object-exceptions

Conversation

@bavulapati

@bavulapati bavulapati commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Ports test_exceptions.c/test_exceptions.js: every object API called against a Proxy whose traps throw must report a pending exception rather than swallowing it.

Uses mustCallAtLeast rather than mustCall, since how often an engine consults a given trap is unspecified.

Gated on a new runtimeFeatures.proxyHandlerExceptions flag. Node.js only got this behaviour in v22.0.0 (nodejs/node@52fcf14258b, "return napi_exception_pending on proxy handlers"), and it was never backported to v20.x - there the throw escapes the addon instead of being reported, so there is nothing meaningful to assert.

Depends on #71 (which adds mustCallAtLeast) and #79. The branch currently carries #71's commit so CI can run; that drops out once #71 lands and this is rebased.

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

Labels

None yet

Projects

Status: Need Triage

Development

Successfully merging this pull request may close these issues.

1 participant