archives

« Bugzilla Issues Index

#3724 — "enumerate" traps are not sprung when [[Enumerate]] accesses prototype properties


Ordinary Object [[Enumerate]] (9.1.11) is required to process properties from prototypes of the object, but is currently **not** required to call the prototype's [[Enumerate]] as the means of accessing them.

This produces the following undesirable behaviour: if an object has a prototype which is a proxy with an "enumerate" trap, the trap will not be triggered by performing for-in on the object. In particular, if code is given a proxy with an "enumerate" trap, it can merely enclose the proxy in an Object.create() call to bypass the trap outright.

See: https://esdiscuss.org/topic/the-enumerate-trap-and-object-create


fixed in rev34 editor's draft


fixed in rev34