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

HasOwnProperty should call GetOwnProperty and not GetProperty #443

Closed
n14little opened this issue Jun 2, 2020 · 1 comment · Fixed by #444
Closed

HasOwnProperty should call GetOwnProperty and not GetProperty #443

n14little opened this issue Jun 2, 2020 · 1 comment · Fixed by #444
Assignees
Labels
bug Something isn't working
Milestone

Comments

@n14little
Copy link
Contributor

Describe the bug
According to the spec, HasOwnProperty should be calling GetOwnProperty. However, Boa is calling getProperty as seen here: https://github.com/boa-dev/boa/blob/master/boa/src/builtins/object/mod.rs#L611

To Reproduce

var x = { someProp: 1 };
console.log(x.hasOwnProperty('someProp');
console.log(x.hasOwnProperty('hasOwnProperty');

Expected behavior
The above code should return true and false, respectively. However, Boa is returning true for both.

Build environment (please complete the following information):

  • OS: Ubuntu Linux
  • Version: 20.04
  • Target triple: x86_64-unknown-linux-gnu
  • Rustc version: 1.43.1 (8d69840ab 2020-05-04)

Additional context
You can find more information on MDN.

@n14little n14little added the bug Something isn't working label Jun 2, 2020
@n14little
Copy link
Contributor Author

I'll also take the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants