Ignore:
Timestamp:
May 2, 2016, 5:01:31 AM (9 years ago)
Author:
[email protected]
Message:

Class contructor and methods shouldn't have "arguments" and "caller"
https://bugs.webkit.org/show_bug.cgi?id=144238

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

Added TypeError that is raised in case of access to properties 'arguments' or 'caller'
of constructor or method of class.

  • runtime/JSFunction.cpp:

(JSC::getThrowTypeErrorGetterSetter):
(JSC::JSFunction::getOwnPropertySlot):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::createThrowTypeErrorArgumentsAndCaller):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::throwTypeErrorArgumentsAndCallerGetterSetter):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncThrowTypeErrorArgumentsAndCaller):

  • runtime/JSGlobalObjectFunctions.h:

LayoutTests:

  • js/class-method-and-constructor-properties-expected.txt: Added.
  • js/class-method-and-constructor-properties.html: Added.
  • js/script-tests/class-method-and-constructor-properties.js: Added.
File:
1 edited

Legend:

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

    r184642 r200321  
    5050EncodedJSValue JSC_HOST_CALL globalFuncUnescape(ExecState*);
    5151EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeError(ExecState*);
     52EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeErrorArgumentsAndCaller(ExecState*);
    5253EncodedJSValue JSC_HOST_CALL globalFuncProtoGetter(ExecState*);
    5354EncodedJSValue JSC_HOST_CALL globalFuncProtoSetter(ExecState*);
Note: See TracChangeset for help on using the changeset viewer.