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

Builtin object methods have wrong attributes #761

Closed
HalidOdat opened this issue Oct 2, 2020 · 2 comments · Fixed by #722
Closed

Builtin object methods have wrong attributes #761

HalidOdat opened this issue Oct 2, 2020 · 2 comments · Fixed by #722
Assignees
Labels
bug Something isn't working builtins PRs and Issues related to builtins/intrinsics Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com
Milestone

Comments

@HalidOdat
Copy link
Member

Describe the bug
Builtin object methods like Object.is() Array.prototype.push, etc, have WRITABLE, ENUMERABLE and CONFIGURABLE, but they should have WRITABLE, NON_ENUMERABLE and CONFIGURABLE

To Reproduce
Steps to reproduce the issue, or JavaScript code that causes this failure.

This JavaScript code reproduces the issue:

Array.prototype.propertyIsEnumerable("push") // this returns `true`, but it should return `false`
@HalidOdat HalidOdat added bug Something isn't working Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com builtins PRs and Issues related to builtins/intrinsics labels Oct 2, 2020
@HalidOdat HalidOdat added this to the v0.10.0 milestone Oct 2, 2020
@HalidOdat HalidOdat self-assigned this Oct 2, 2020
@RageKnify RageKnify modified the milestones: v0.10.0, v0.11.0 Oct 2, 2020
@Razican
Copy link
Member

Razican commented Oct 4, 2020

Hey, any mention on when was this solved / why was it closed?

@HalidOdat
Copy link
Member Author

HalidOdat commented Oct 4, 2020

Hey, any mention on when was this solved / why was it closed?

This was closed when #722 got merged, because they have the correct attribute now https://github.com/boa-dev/boa/blob/master/boa/src/object/mod.rs#L829-L833 and https://github.com/boa-dev/boa/blob/master/boa/src/object/mod.rs#L856-L860 in ConstructorBuilder .method and .static_method which removed the need for make_builtin_fn and make_constructor_fn and manual object/prototype creation.

In future PR I will remove make_builtin_fn and make_constructor_fn entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working builtins PRs and Issues related to builtins/intrinsics Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com
Projects
None yet
3 participants