Skip to content

Conversation

nommiin
Copy link

@nommiin nommiin commented Jul 4, 2025

At the moment, passing undefined into weak_ref_alive on HTML5 will cause yyError("incorrect number of arguments to weak_ref_alive"); to be thrown. On VM/YYC, the function will return undefined without error.

This behavior does not match what occurs on VM (and YYC) and what is stated in the documentation:

Note that if you supply a value that is not a weak reference, the function will return undefined.

My PR adjusts weak_ref_alive to instead check if any arguments are provided, rather than checking for undefined. This brings the functionality to match VM and YYC as of beta v2024.1400.0.836

@nommiin
Copy link
Author

nommiin commented Jul 4, 2025

Checking through the codebase, maybe it makes more sense to check if there's explicitly 1 argument but alas...

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.

1 participant