Ignore:
Timestamp:
Feb 24, 2016, 12:43:21 PM (9 years ago)
Author:
[email protected]
Message:

[ES6] Implement Proxy.Delete
https://bugs.webkit.org/show_bug.cgi?id=154607

Reviewed by Mark Lam.

This patch implements Proxy.Delete with respect to section 9.5.10 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-delete-p

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::getConstructData):
(JSC::ProxyObject::performDelete):
(JSC::ProxyObject::deleteProperty):
(JSC::ProxyObject::deletePropertyByIndex):

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

(assert):
(throw.new.Error.let.handler.get deleteProperty):
(throw.new.Error):
(assert.let.handler.deleteProperty):
(let.handler.deleteProperty):

File:
1 edited

Legend:

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

    r196868 r197042  
    6464    static CallType getCallData(JSCell*, CallData&);
    6565    static ConstructType getConstructData(JSCell*, ConstructData&);
     66    static bool deleteProperty(JSCell*, ExecState*, PropertyName);
     67    static bool deletePropertyByIndex(JSCell*, ExecState*, unsigned propertyName);
    6668    static void visitChildren(JSCell*, SlotVisitor&);
    6769
     
    6971    bool performInternalMethodGetOwnProperty(ExecState*, PropertyName, PropertySlot&);
    7072    bool performHasProperty(ExecState*, PropertyName, PropertySlot&);
     73    template <typename DefaultDeleteFunction>
     74    bool performDelete(ExecState*, PropertyName, DefaultDeleteFunction);
    7175
    7276    WriteBarrier<JSObject> m_target;
Note: See TracChangeset for help on using the changeset viewer.