webidl
webidl copied to clipboard
Limit the special case in the [[Set]] algorithm to [OverrideBuiltins] interfaces
This is the case where it makes most sense, since the prototype chain can't shadow any properties.
This change does not affect normal usage; it is only detectable by messing with the prototype of the object.
The majority of implementations (Gecko and Chrome) already follow the proposed change; WebKit follows the existing spec.
Fixes #630.
If we do this, then https://github.com/web-platform-tests/wpt/blob/master/webstorage/set.window.js will start failing in the same way as it fails for WebIDL2JS, which currently has a buggy implementation of this (https://github.com/jsdom/webidl2js/pull/218), which causes the special case to always be skipped due to target === receiver
always being false
in a Proxy trap.
This is because the last test case of https://github.com/web-platform-tests/wpt/blob/master/webstorage/set.window.js currently checks that proto.[[Set]]()
isn’t called.