Date.UTC should not return NaN with only Year param
authoryusukesuzuki@slowstart.org <yusukesuzuki@slowstart.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Aug 2018 17:42:32 +0000 (17:42 +0000)
committeryusukesuzuki@slowstart.org <yusukesuzuki@slowstart.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Aug 2018 17:42:32 +0000 (17:42 +0000)
commitfdf6c1face07c88d2cc00509f59218e3425d2588
tree9ab0538214e0b770aed3cd4bb25a8d5bd690c770
parent13c020654586a2d888de4d8991db3dfc603c760b
Date.UTC should not return NaN with only Year param
https://bugs.webkit.org/show_bug.cgi?id=188378

Reviewed by Keith Miller.

JSTests:

* ChakraCore.yaml:
* ChakraCore/test/Date/dateutc.baseline-jsc: Added.
* stress/date-utc-optional.js: Added.
(shouldBe):
* test262/expectations.yaml:

Source/JavaScriptCore:

Date.UTC requires one argument for |year|. But the other ones are optional.
This patch fix this handling.

* runtime/DateConstructor.cpp:
(JSC::millisecondsFromComponents):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChakraCore.yaml
JSTests/ChakraCore/test/Date/dateutc.baseline-jsc [new file with mode: 0644]
JSTests/ChangeLog
JSTests/stress/date-utc-optional.js [new file with mode: 0644]
JSTests/test262/expectations.yaml
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/DateConstructor.cpp