Date.prototype.toLocaleDateString uses overridable Object.create
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Mar 2016 05:31:22 +0000 (05:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Mar 2016 05:31:22 +0000 (05:31 +0000)
commit69beb710fb99131106eeca05ddebd2a8cf3b810e
tree4880c280e593271d82eebb9bd06e55d9eafb7d2b
parent1bcf3c19c94abffcf1fb3d2cd77847e368f4a853
Date.prototype.toLocaleDateString uses overridable Object.create
https://bugs.webkit.org/show_bug.cgi?id=155917

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-25
Reviewed by Mark Lam.

Source/JavaScriptCore:

* builtins/DatePrototype.js:
(toLocaleString.toDateTimeOptionsAnyAll):
(toLocaleDateString.toDateTimeOptionsDateDate):
(toLocaleTimeString.toDateTimeOptionsTimeTime):
Switch from @Object.create to @Object.@create to guarentee we are
using the built-in create method and not user defined code.

* runtime/CommonIdentifiers.h:
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation):
Setup the @create private symbol.

LayoutTests:

* js/regress-155917-expected.txt: Added.
* js/regress-155917.html: Added.
* js/script-tests/regress-155917.js: Added.
(Object.create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/regress-155917-expected.txt [new file with mode: 0644]
LayoutTests/js/regress-155917.html [new file with mode: 0644]
LayoutTests/js/script-tests/regress-155917.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/DatePrototype.js
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/JavaScriptCore/runtime/ObjectConstructor.cpp