Ignore:
Timestamp:
Feb 22, 2012, 5:25:37 PM (13 years ago)
Author:
[email protected]
Message:

Implement DefineOwnProperty for the arguments object
https://bugs.webkit.org/show_bug.cgi?id=79309

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • runtime/Arguments.cpp:

(JSC::Arguments::deletePropertyByIndex):
(JSC::Arguments::deleteProperty):

  • Deleting an argument should also delete the copy on the object, if any.

(JSC::Arguments::defineOwnProperty):

  • Defining a property may override the live mapping.
  • runtime/Arguments.h:

(Arguments):

LayoutTests:

  • fast/js/arguments-expected.txt:
  • fast/js/script-tests/arguments.js:
    • Added test cases
File:
1 edited

Legend:

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

    r104119 r108582  
    118118        static bool deleteProperty(JSCell*, ExecState*, const Identifier& propertyName);
    119119        static bool deletePropertyByIndex(JSCell*, ExecState*, unsigned propertyName);
     120        static bool defineOwnProperty(JSObject*, ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow);
    120121        void createStrictModeCallerIfNecessary(ExecState*);
    121122        void createStrictModeCalleeIfNecessary(ExecState*);
Note: See TracChangeset for help on using the changeset viewer.