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

Property 0 not found. for Object('z').propertyIsEnumerable(0); Since 1.7.7.2 #415

Closed
AdamMagaluk opened this issue Apr 3, 2018 · 3 comments

Comments

@AdamMagaluk
Copy link

Since 1.7.7.2 I believe this commit 6f0f1f6
the following code is throwing a Property X not found. error.

Object('z').propertyIsEnumerable(0);

Happens to be used in Babel/Core-js here: https://github.com/zloirock/core-js/blob/master/modules/_iobject.js

@AdamMagaluk
Copy link
Author

Looks like the offending likes are 181-182 6f0f1f6#diff-2cf4f04515b67f4b403268e8a639d956R181

In pre 1.7.7.2 result would be false whereas 1.7.7.2 it's true .

@AdamMagaluk
Copy link
Author

AdamMagaluk commented Apr 3, 2018

result is now set to true because NativeString now implements a has(int index, Scriptable start) method. 6f0f1f6#diff-b7aa9b03bc541a7fc69d6249d19dc668R560

@AdamMagaluk
Copy link
Author

result = thisObj.has(index, thisObj); I think should return true for my test case since 's'[0] returns 's'. But with that on line 185. int attrs = so.getAttributes(index); fails.

whitlockjc added a commit to whitlockjc/rhino that referenced this issue Apr 5, 2018
When checking property enumerability
_(`Object.prototype.propertyIsEnumerable`)_, missing properties should return
`false` instead of throwing a `Property {0} not found.` exception.

Fixes mozilla#415
whitlockjc added a commit to whitlockjc/rhino that referenced this issue Apr 6, 2018
When checking property enumerability
_(`Object.prototype.propertyIsEnumerable`)_ on a `String`, missing properties
should return `false` instead of throwing a `Property {0} not found.` exception.

Fixes mozilla#415
gbrail pushed a commit that referenced this issue Apr 9, 2018
When checking property enumerability
_(`Object.prototype.propertyIsEnumerable`)_ on a `String`, missing properties
should return `false` instead of throwing a `Property {0} not found.` exception.

Fixes #415
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

No branches or pull requests

1 participant