Closed Bug 795903 Opened 13 years ago Closed 11 years ago

getOwnPropertyDescriptor trap can't report a configurable property as non-configurable

Categories

(Core :: JavaScript Engine, defect)

18 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bruant.d, Unassigned)

References

Details

Attachments

(1 obsolete file)

This is a spec issue recently found, so Firefox doesn't comply. Test case: var target = {}; Object.defineProperty(target, 'x', {value:1,configurable:true}); var proxy = Proxy(target, { getOwnPropertyDescriptor: function(target, name) { return { value: 2, configurable: false }; } }); Object.getOwnPropertyDescriptor(proxy, 'x') Actual result: Doesn't throw an error and returns the incompatible property descriptor Expected result: throw TypeError
Blocks: 703537
Revision 1348497118 of http://wiki.ecmascript.org/doku.php?id=harmony:proxies_spec changes the algorithm to report error on not just a non-existent property being reported as non-configurable, but also checks that if the property exists and is configurable, the handler doesn't report it as non-configurable
Attachment #668698 - Flags: review?(ejpbruel)
Can anyone fix this? This can drive you insane when you don't know it!
Comment on attachment 668698 [details] [diff] [review] Update GetOwnProperty and DefineProperty Traps according to spec changes Really old patch, up for grabs if someone is willing to update.
Attachment #668698 - Attachment is obsolete: true
Attachment #668698 - Flags: review?(ejpbruel)
See Also: → 793210
See Also: → 806299
Assignee: general → nobody
This was probably fixed in bug 806299
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: