Skip to content

Fix double exception raise in Proxy [[Delete]] invariant checks - #5305

Open
SAY-5 wants to merge 1 commit into
jerryscript-project:masterfrom
SAY-5:fix-proxy-delete-double-raise
Open

SAY-5 wants to merge 1 commit into
jerryscript-project:masterfrom
SAY-5:fix-proxy-delete-double-raise

Conversation

@SAY-5

@SAY-5 SAY-5 commented Aug 26, 2026

Copy link
Copy Markdown

ecma_proxy_object_delete_property runs the two ProxyDeleteProperty result invariants (non-configurable property, non-extensible target) in sequence. When a deleteProperty trap returns true for a non-configurable property on a non-extensible target, both checks fail and ecma_raise_type_error is called twice. The second call raises a TypeError while one is already pending, which trips the !jcontext_has_pending_exception () assertion and aborts assertion-enabled builds; release builds overwrite the pending exception state. Per the spec the non-configurable check throws and returns, so the extensibility check should only run when the property is configurable. Added a regression case to tests/jerry/proxy_delete.js that aborts before the change and passes after.

Fixes #5296

JerryScript-DCO-1.0-Signed-off-by: Sai Asish Y say.apm35@gmail.com

This branch has not been deployed

No deployments
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.

JerryScript: Proxy deleteProperty invariant checks can raise two exceptions and abort debug builds

1 participant