Ignore:
Timestamp:
Feb 18, 2016, 5:07:37 PM (10 years ago)
Author:
[email protected]
Message:

Implement Proxy.HasProperty
https://bugs.webkit.org/show_bug.cgi?id=154313

Reviewed by Filip Pizlo.

This patch is a straight forward implementation of
Proxy.HasProperty with respect to section 9.5.7
of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-hasproperty-p

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performInternalMethodGetOwnProperty):
(JSC::ProxyObject::performHasProperty):
(JSC::ProxyObject::getOwnPropertySlotCommon):

  • runtime/ProxyObject.h:
  • tests/es6.yaml:
  • tests/stress/proxy-basic.js:

(assert):
(let.handler.has):

  • tests/stress/proxy-has-property.js: Added.

(assert):
(throw.new.Error.let.handler.get has):
(throw.new.Error):
(assert.let.handler.has):
(let.handler.has):
(getOwnPropertyDescriptor):
(i.catch):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/ProxyObject.h

    r196772 r196789  
    6666    bool getOwnPropertySlotCommon(ExecState*, PropertyName, PropertySlot&);
    6767    bool performInternalMethodGetOwnProperty(ExecState*, PropertyName, PropertySlot&);
     68    bool performHasProperty(ExecState*, PropertyName, PropertySlot&);
    6869
    6970    WriteBarrier<JSObject> m_target;
Note: See TracChangeset for help on using the changeset viewer.