new Date(NaN).toJSON() must return null instead of throwing a TypeError
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Jul 2015 23:10:07 +0000 (23:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Jul 2015 23:10:07 +0000 (23:10 +0000)
commitdd4b2609be44585d005c37c3dd2ef695483baa99
tree1b1645b8745d30e2c55255924d14243a1c183cf2
parent924389cf5198361a69bd5db8a3205a65fa3a5007
new Date(NaN).toJSON() must return null instead of throwing a TypeError
https://bugs.webkit.org/show_bug.cgi?id=141115

Patch by Jordan Harband <ljharb@gmail.com> on 2015-07-19
Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncToJSON):

LayoutTests:

* js/dom/JSON-stringify-expected.txt:
* js/resources/JSON-stringify.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/dom/JSON-stringify-expected.txt
LayoutTests/js/resources/JSON-stringify.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/DatePrototype.cpp