test262: test262/test/built-ins/Object/prototype/toLocaleString/primitive_this_value.js
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Apr 2017 02:59:40 +0000 (02:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Apr 2017 02:59:40 +0000 (02:59 +0000)
commit35ca283a4b155820b245f44ef4c0a89296d8eab5
treebd1b1547e033e9e5130541d317f289b35e8b7818
parent29635c6cb60017fafec46267ff7495c4904b9a78
test262: test262/test/built-ins/Object/prototype/toLocaleString/primitive_this_value.js
https://bugs.webkit.org/show_bug.cgi?id=170882

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-16
Reviewed by Saam Barati.

JSTests:

* test262.yaml:

Source/JavaScriptCore:

* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncToLocaleString):
We should be using the this value without ToObject conversion both when
getting the potential accessor and calling it. In strict mode, the this
value will remain its simple value, in non-strict it is still converted.

LayoutTests:

* js/dom/object-prototype-toLocaleString-expected.txt:
* js/dom/script-tests/object-prototype-toLocaleString.js:
Test the case of toLocaleString where toString does not exist.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/test262.yaml
LayoutTests/ChangeLog
LayoutTests/js/dom/object-prototype-toLocaleString-expected.txt
LayoutTests/js/dom/script-tests/object-prototype-toLocaleString.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ObjectPrototype.cpp