[ES6] Implement Reflect.getOwnPropertyDescriptor
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Aug 2015 18:28:19 +0000 (18:28 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Aug 2015 18:28:19 +0000 (18:28 +0000)
commit9c078a854ace1a2610629178df14a00aab7e36e9
tree100f8420291f4536d6eaf9a0bc259d260bf989ae
parent15ad991a62c431947efe70dccc93c1ab930c5467
[ES6] Implement Reflect.getOwnPropertyDescriptor
https://bugs.webkit.org/show_bug.cgi?id=147929

Reviewed by Geoffrey Garen.

Implement Reflect.getOwnPropertyDescriptor.
The difference from the Object.getOwnPropertyDescriptor is
Reflect.getOwnPropertyDescriptor does not perform ToObject onto
the first argument. If the first argument is not an Object, it
immediately raises the TypeError.

* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/ObjectConstructor.h:
* runtime/ReflectObject.cpp:
(JSC::reflectObjectGetOwnPropertyDescriptor):
* tests/stress/reflect-get-own-property.js: Added.
(shouldBe):
(shouldThrow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ObjectConstructor.cpp
Source/JavaScriptCore/runtime/ObjectConstructor.h
Source/JavaScriptCore/runtime/ReflectObject.cpp
Source/JavaScriptCore/tests/stress/reflect-get-own-property.js [new file with mode: 0644]