webidl icon indicating copy to clipboard operation
webidl copied to clipboard

Limit the special case in the [[Set]] algorithm to [OverrideBuiltins] interfaces

Open Ms2ger opened this issue 5 years ago • 1 comments

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.

Ms2ger avatar Apr 16 '19 14:04 Ms2ger

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.

ExE-Boss avatar May 09 '20 22:05 ExE-Boss