Skip to content
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

Editorial: Remove unnecessary undefined type from property descriptor tests #3402

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anba
Copy link
Contributor

@anba anba commented Aug 26, 2024

Is{Accessor,Data,Generic}Descriptor are never called with undefined.


StructuredSerializeInternal seems to be the only caller where undefined is ever used as an input.

…or tests

`Is{Accessor,Data,Generic}Descriptor` are never called with `undefined`.
@bakkot
Copy link
Contributor

bakkot commented Oct 23, 2024

IsDataDescriptor is called in step 2.b of [[DefineOwnProperty]] for Arrays and step 8 of ArraySetLength passing a value which the reader does not know not to be undefined. I would change both of those steps to something like Assert: _lengthDesc_ is not *undefined* and IsDataDescriptor(_lengthDesc_) is *true*.

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.

3 participants