Source/JavaScriptCore:
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Aug 2015 23:23:56 +0000 (23:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Aug 2015 23:23:56 +0000 (23:23 +0000)
commit94ec644480e11098670cfa0ac1153ec2e1b2f745
tree454f77974480f01a3961f47296f993439c833c1d
parentcde753e00dbab37a36cb38d2a3a40a8d0e73d40d
Source/JavaScriptCore:
The JSONP parser incorrectly parsers -0 as +0.
https://bugs.webkit.org/show_bug.cgi?id=147590

Patch by Keith Miller <keith_miller@apple.com> on 2015-08-06
Reviewed by Michael Saboff.

In the LiteralParser we should use a double to store the accumulator for numerical tokens
rather than an int. Using an int means that -0 is, incorrectly, parsed as +0.

* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lexNumber):

LayoutTests:
The JSONP parser incorrectly parses -0 as +0.
https://bugs.webkit.org/show_bug.cgi?id=147590

Patch by Keith Miller <keith_miller@apple.com> on 2015-08-06
Reviewed by Michael Saboff.

A simple test that attempts loads a JSONP that sets a variable to 0.

* js/regress/JSONP-negative-0-expected.txt: Added.
* js/regress/JSONP-negative-0.html: Added.
* js/regress/script-tests/JSONP-negative-0.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/regress/JSONP-negative-0-expected.txt [new file with mode: 0644]
LayoutTests/js/regress/JSONP-negative-0.html [new file with mode: 0644]
LayoutTests/js/regress/script-tests/JSONP-negative-0.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/LiteralParser.cpp