Skip to content

WeakRef.deref() should return undefined if value is garbage collected #651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ammarahm-ed opened this issue Nov 6, 2024 · 0 comments · Fixed by #653
Closed

WeakRef.deref() should return undefined if value is garbage collected #651

ammarahm-ed opened this issue Nov 6, 2024 · 0 comments · Fixed by #653

Comments

@ammarahm-ed
Copy link
Contributor

As of now, calling deref or a garabage collected value throws an error instead of returning undefined value.

For reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef/deref

bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Nov 6, 2024
Set the object's opaque to a sentinel value instead of NULL, to stop
JS_GetOpaque2 from raising an "illegal class" exception.

Fixes: quickjs-ng#651
bluesky950520 pushed a commit to bluesky950520/quickjs that referenced this issue Mar 14, 2025
Set the object's opaque to a sentinel value instead of NULL, to stop
JS_GetOpaque2 from raising an "illegal class" exception.

Fixes: quickjs-ng/quickjs#651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant