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

Merged
merged 1 commit into from
Apr 2, 2025

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.

@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*.

@michaelficarra michaelficarra added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Apr 2, 2025
…or tests (tc39#3402)

`Is{Accessor,Data,Generic}Descriptor` are never called with `undefined`.
@ljharb ljharb merged commit 6ccb804 into tc39:main Apr 2, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Editors believe this PR needs no further reviews, and is ready to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants