Hi David, I think you caught a spec bug, because your example should indeed throw, yet it currently doesn't (neither in my harmony-reflect shim nor in Firefox nightly).
The code doesn't throw because the relevant checks for getOwnPropertyDescriptor are currently: 1) is the returned descriptor d "compatible" in the sense that Object.defineProperty(target,name,d) wouldn't throw a TypeError. And indeed, it is valid to redefine a configurable into a non-configurable descriptor, so this check passes. 2) if the returned descriptor is non-configurable, check if the property does exist on the target. Since the property exists, this check passes as well. Check no. 2 should be strengthened to: if the returned descriptor is non-configurable, check if the property does exist *as a non-configurable property* on the target. Just checking for presence/absence is not strong enough, as your example demonstrates. Other than that: yes, in order to perform the check, the proxy will call [[GetOwnProperty]] on the target, which is observable if the target is itself a proxy, but that is already specified in the draft Proxy spec. Cheers, Tom
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

