Bug 129890

Summary: localStorage keys are not enumerable
Product: WebKit Reporter: Mariusz Nowak <medikoo+webkit.org>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ashvayka
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=166835

Mariusz Nowak
Reported 2014-03-07 10:14:40 PST
localStorage.foo = 'bar'; localStorage.foo; // 'bar' Object.keys(localStorage); // ['foo'] localStorage.propertyIsEnumerable('foo'); // false (should be true) Strictly Webkit bug, all other engines behave ok.
Attachments
Alexey Shvayka
Comment 1 2021-01-04 10:57:33 PST
(In reply to Mariusz Nowak from comment #0) > Strictly Webkit bug, all other engines behave ok. Thank you for the report! WebKit's getOwnPropertySlot() used to unconditionally set PropertyAttribute::DontEnum for named getter properties, causing this bug. This was fixed in r210667. WPT coverage: https://github.com/web-platform-tests/wpt/blob/dbc7edfaa96e559b9aa34a9c898a1ad54d877b58/webstorage/storage_enumerate.html#L53.
Note You need to log in before you can comment on or make changes to this bug.