feat: port test_object test_exceptions to CTS - #81
Open
bavulapati wants to merge 6 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mustCallAtLeastrather thanmustCall, since how often an engine consults a given trap is unspecified.Gated on a new
runtimeFeatures.proxyHandlerExceptionsflag. 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.