Function proxies without explicit construct trap

Andreas Rossberg rossberg at
Thu Nov 10 09:49:42 PST 2011

I think the specification of [[Construct]] for function proxies may
not currently be doing what it is intended to do. If the proxy does
not have a construct trap, the method simply delegates to the
[[Construct]] method of the call trap. AFAICS, that has two

1. The prototype is taken from the call trap, not from the proxy.

2. If the trap returns a primitive value, that will be ignored and
replaced with a freshly allocated object, as usual.

It is not clear to me whether either was intended, but the former
seems surprising, and the latter is inconsistent with the behaviour
expected by the construct-primitive test case from

Any ideas?


More information about the es-discuss mailing list