Use SameValue to compare property descriptor values
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jan 2012 19:22:54 +0000 (19:22 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jan 2012 19:22:54 +0000 (19:22 +0000)
commit89484c56d481388ad6208c813fc1ac8c4e76685f
treea59299d43a1fac1b681b2396bd953d8be8aa4745
parent510629d8d1a9950200d7994511fe4afa504373e9
Use SameValue to compare property descriptor values
https://bugs.webkit.org/show_bug.cgi?id=75975

Reviewed by Sam Weinig.

Source/JavaScriptCore:

Rather than strictEqual.

* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnNumericProperty):
    - Missing configurablePresent() check.
* runtime/JSObject.cpp:
(JSC::JSObject::defineOwnProperty):
    - call sameValue.
* runtime/PropertyDescriptor.cpp:
(JSC::sameValue):
    - Moved from JSArray.cpp, fix NaN comparison.
(JSC::PropertyDescriptor::equalTo):
    - call sameValue.
* runtime/PropertyDescriptor.h:
    - Added declaration for sameValue.

LayoutTests:

* fast/js/array-defineOwnProperty-expected.txt:
* fast/js/script-tests/array-defineOwnProperty.js:
    - Add new test cases.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@104602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/js/array-defineOwnProperty-expected.txt
LayoutTests/fast/js/script-tests/array-defineOwnProperty.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSArray.cpp
Source/JavaScriptCore/runtime/JSObject.cpp
Source/JavaScriptCore/runtime/PropertyDescriptor.cpp
Source/JavaScriptCore/runtime/PropertyDescriptor.h