You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
part of whose purpose is to be conditional on whether there is a WeakRef variable in scope. According to the SES semantics this code is incorrect. If there is no WeakRef variable in scope, it should throw a ReferenceError instead. However, due to necessary limitations of the SES-shim, it returns an undefined instead. Because this code was tested only on the SES-shim, this but went undetected until it was spotted during a manual review.
This bug itself cannot be fixed in the SES-shim at reasonable engineering cost, so I don't expect it to be closed. I file it as a caution against falling into this trap.
This discussion was converted from issue #1136 on January 10, 2024 00:14.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
See Agoric/agoric-sdk#4767 (comment)
At the time of writing, the code that appears there is
part of whose purpose is to be conditional on whether there is a
WeakRef
variable in scope. According to the SES semantics this code is incorrect. If there is noWeakRef
variable in scope, it should throw aReferenceError
instead. However, due to necessary limitations of the SES-shim, it returns anundefined
instead. Because this code was tested only on the SES-shim, this but went undetected until it was spotted during a manual review.This bug itself cannot be fixed in the SES-shim at reasonable engineering cost, so I don't expect it to be closed. I file it as a caution against falling into this trap.
Beta Was this translation helpful? Give feedback.
All reactions