JSON errors should be informative
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jul 2011 17:53:40 +0000 (17:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jul 2011 17:53:40 +0000 (17:53 +0000)
commit0eb4babffbdeb7fabd9a348a0b93d4b8eb4e04b6
tree00ffe8c86daa00d6f7fac188f1a79ad2872acc8b
parent95813a545527185d60ffb0221bdb462afb7b51fd
JSON errors should be informative
https://bugs.webkit.org/show_bug.cgi?id=63339

Source/JavaScriptCore:

Added error messages to the JSON Parser.

Patch by Juan C. Montemayor <jmont@apple.com> on 2011-07-26
Reviewed by Oliver Hunt.

* runtime/JSONObject.cpp:
(JSC::JSONProtoFuncParse):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::Lexer::lex):
(JSC::LiteralParser::Lexer::lexString):
(JSC::LiteralParser::Lexer::lexNumber):
(JSC::LiteralParser::parse):
* runtime/LiteralParser.h:
(JSC::LiteralParser::getErrorMessage):
(JSC::LiteralParser::Lexer::sawError):
(JSC::LiteralParser::Lexer::getErrorMessage):

LayoutTests:

Updated expected test results.

Patch by Juan C. Montemayor <jmont@apple.com> on 2011-07-26
Reviewed by Oliver Hunt.

* fast/js/JSON-parse-expected.txt:
* platform/chromium/fast/js/JSON-parse-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/js/JSON-parse-expected.txt
LayoutTests/platform/chromium/fast/js/JSON-parse-expected.txt [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSONObject.cpp
Source/JavaScriptCore/runtime/LiteralParser.cpp
Source/JavaScriptCore/runtime/LiteralParser.h