Bug 151812
| Summary: | Numeric properties of an object will not use accessors defined on the object's prototype | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Daniel Freedman <dfreedm> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | cdumez, ddkilzer, ljharb, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Daniel Freedman
Reproduction:
var proto = Object.create(null);
Object.defineProperty(proto, '0', {
get: function(){console.log('get')},
set: function(){console.log('set')}
});
var o = Object.create(proto);
o[0] = 3;
o[0] === undefined
Expected:
Console prints 'set', 'get', and 'true', as o[0] === undefined.
Actual:
Console prints 'false', as o[0] === 3
Chrome, Firefox, and IE/Edge will show the expected behavior.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/28263024>
David Kilzer (:ddkilzer)
According to this thread on Twitter, the bug is already fixed in Safari 10:
<https://twitter.com/JakeDChampion/status/775293346608713728>
David Kilzer (:ddkilzer)
Not sure when this was fixed, so RESOLVED/CONFIG CHANGED.