Skip to content

Handle nullexnref on JS boundary#8437

Merged
tlively merged 5 commits intomainfrom
exec-tojs-nullexnref
Mar 10, 2026
Merged

Handle nullexnref on JS boundary#8437
tlively merged 5 commits intomainfrom
exec-tojs-nullexnref

Conversation

@tlively
Copy link
Member

@tlively tlively commented Mar 10, 2026

Throw a JSException (modeling a TypeError) when passing nullexnref to
JS. We had already handled throwing an error when passing a non-null
exnref, but without handling nulls, SignatureRefining could optimize a
exnref to a nullexnref on the boundary and change the throwing behavior.
This was a bug in the interpreter rather than in the optimization pass.

Throw a JSException (modeling a TypeError) when passing nullexnref to
JS. We had already handled throwing an error when passing a non-null
exnref, but without handling nulls, SignatureRefining could optimize a
exnref to a nullexnref on the boundary and change the throwing behavior.
This was a bug in the interpreter rather than in the optimization pass.
@tlively tlively requested a review from kripken March 10, 2026 00:38
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

lgtm % comment

Co-authored-by: Alon Zakai <azakai@google.com>
@tlively tlively enabled auto-merge (squash) March 10, 2026 17:21
@tlively tlively merged commit 37e1dc7 into main Mar 10, 2026
17 checks passed
@tlively tlively deleted the exec-tojs-nullexnref branch March 10, 2026 18:31
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.

2 participants