Closed
Bug 1176198
Opened 10 years ago
Closed 10 years ago
Don't call ToPropertyKey in Proxy ownKeys trap
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 1049662
Tracking | Status | |
---|---|---|
firefox41 | --- | affected |
People
(Reporter: anba, Unassigned)
References
(Blocks 1 open bug)
Details
---
js> Object.getOwnPropertyNames(new Proxy({}, {ownKeys: () => [0]}))
["0"]
js> Object.getOwnPropertyNames(new Proxy({}, {ownKeys: () => [{toString: () => { print("toString called"); return "" }}]}))
toString called
[""]
---
Expected: Both calls to Object.getOwnPropertyNames() throw a TypeError
Actual: Non-String/Symbol values are converted to strings
Comment 1•10 years ago
|
||
Going to fix this by re-implementing this method. Thanks.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•