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

Add more Object methods #1240

Merged
merged 4 commits into from
May 25, 2023
Merged

Conversation

lucacasonato
Copy link
Member

Specifically Object::get_own_property_descriptor
and Object::get_property_attributes

Specifically Object::get_own_property_descriptor
and Object::get_property_attributes

/// Implements Object.getOwnPropertyDescriptor(O, P), see
/// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor.
pub fn get_own_property_descriptor<'s>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance you could test a code path that returns None?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V8 seems to never return an Empty MaybeLocal here. They also don't test this in their test_api.cc.

src/object.rs Show resolved Hide resolved
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lucacasonato lucacasonato enabled auto-merge (squash) May 25, 2023 11:18
@lucacasonato lucacasonato merged commit 43b798a into denoland:main May 25, 2023
@lucacasonato lucacasonato deleted the object_methods branch May 25, 2023 13:05
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.

2 participants