RESOLVED FIXED 154665
[ES6] for...in iteration doesn't comply with the specification
https://bugs.webkit.org/show_bug.cgi?id=154665
Summary [ES6] for...in iteration doesn't comply with the specification
Saam Barati
Reported 2016-02-24 20:53:31 PST
Specifically, the has_*_property call JSObject::hasProperty instead of JSObject::hasOwnProperty (which is essentially calling [[GetOwnProperty]]). see the specification: https://tc39.github.io/ecma262/#sec-enumerate-object-properties
Attachments
patch (11.16 KB, patch)
2016-02-25 15:28 PST, Saam Barati
msaboff: review+
Saam Barati
Comment 1 2016-02-25 14:36:49 PST
(In reply to comment #0) > Specifically, the has_*_property call JSObject::hasProperty > instead of JSObject::hasOwnProperty (which is essentially calling > [[GetOwnProperty]]). > > see the specification: > https://tc39.github.io/ecma262/#sec-enumerate-object-properties This assessment isn't quite right. We want to process over the entire prototype chain like hasProperty does, but we want to perform [[GetOwnProperty]] and not [[HasProperty]].
Saam Barati
Comment 2 2016-02-25 15:28:14 PST
Michael Saboff
Comment 3 2016-02-25 15:35:29 PST
Comment on attachment 272252 [details] patch r=me
Saam Barati
Comment 4 2016-02-25 16:16:24 PST
Note You need to log in before you can comment on or make changes to this bug.