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: http://svn.webkit.org/repository/webkit/trunk@187016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed