Ignore:
Timestamp:
Nov 4, 2019, 3:29:10 PM (6 years ago)
Author:
[email protected]
Message:

Set isn't correct with respect to the spec and Proxy
https://bugs.webkit.org/show_bug.cgi?id=155012

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-11-04
Reviewed by Saam Barati.

This patch merely removes a FIXME comment, as JavaScriptCore has already correct
implementation of ordinary Set. In step 2.b of https://tc39.es/ecma262/#sec-ordinarysetwithowndescriptor,
if parent is a Proxy, the algorithm returns result of Proxy's Set method call.
It is up to the author of "set" trap (if any) to consult the prototype chain.

All browsers pass https://test262.report/browse/built-ins/Proxy/set/call-parameters-prototype.js,
which asserts that no traps besides "set" are invoked on Proxies in prototype chain during Set.

  • runtime/JSObject.cpp:

(JSC::JSObject::putInlineSlow):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r252015 r252019  
     12019-11-04  Alexey Shvayka  <[email protected]>
     2
     3        [[Set]] isn't correct with respect to the spec and Proxy
     4        https://bugs.webkit.org/show_bug.cgi?id=155012
     5
     6        Reviewed by Saam Barati.
     7
     8        This patch merely removes a FIXME comment, as JavaScriptCore has already correct
     9        implementation of ordinary [[Set]]. In step 2.b of https://tc39.es/ecma262/#sec-ordinarysetwithowndescriptor,
     10        if `parent` is a Proxy, the algorithm returns result of Proxy's [[Set]] method call.
     11        It is up to the author of "set" trap (if any) to consult the prototype chain.
     12
     13        All browsers pass https://test262.report/browse/built-ins/Proxy/set/call-parameters-prototype.js,
     14        which asserts that no traps besides "set" are invoked on Proxies in prototype chain during [[Set]].
     15
     16        * runtime/JSObject.cpp:
     17        (JSC::JSObject::putInlineSlow):
     18
    1192019-11-04  Robin Morisset  <[email protected]>
    220
Note: See TracChangeset for help on using the changeset viewer.