[Webkit-unassigned] [Bug 189030] For-in over a proxy with ownKeys handler hits non-enumerable keys
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 10 17:04:06 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=189030
--- Comment #1 from bakkot at gmail.com ---
This is probably related, so I'm going to add it as a comment here:
JSC can also print the same key twice. According to Allen Wirfs-Brock [1], "no duplicate names" is the most important property required by the spec, so this seems especially bad.
Sample code:
```
let a = {
x: 0,
};
let b = {
x: 0,
};
let pb = new Proxy(b, {
ownKeys(target) {
return Reflect.ownKeys(target);
},
});
Object.setPrototypeOf(a, pb);
for (let key in a) {
console.log(key);
}
```
This prints `x` twice.
[1] https://github.com/tc39/ecma262/issues/1281#issuecomment-411133580
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180911/cb5b8e98/attachment.html>
More information about the webkit-unassigned
mailing list