Bug 147590 - The JSONP parser incorrectly parsers -0 as +0.
Summary: The JSONP parser incorrectly parsers -0 as +0.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-03 14:08 PDT by Keith Miller
Modified: 2015-08-06 16:24 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.46 KB, patch)
2015-08-03 14:17 PDT, Keith Miller
no flags Details | Formatted Diff | Diff
Benchmark results (56.93 KB, text/plain)
2015-08-03 15:26 PDT, Keith Miller
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Miller 2015-08-03 14:08:26 PDT
Running x = -0 on the jsc command line causes x to be set to 0 rather than -0. This is due to an issue in the JSONP parser which stores the accumulator variable while reading the number token as an int rather than a double.
Comment 1 Keith Miller 2015-08-03 14:17:01 PDT
Created attachment 258112 [details]
Patch
Comment 2 Michael Saboff 2015-08-03 14:24:31 PDT
Comment on attachment 258112 [details]
Patch

r=me provided there aren't any performance regressions.
Comment 3 Keith Miller 2015-08-03 15:26:40 PDT
Created attachment 258124 [details]
Benchmark results

Adding my benchmark results for posterity.
Comment 4 Keith Miller 2015-08-03 15:30:57 PDT
rdar://problem/22101327
Comment 5 WebKit Commit Bot 2015-08-06 16:24:11 PDT
Comment on attachment 258112 [details]
Patch

Clearing flags on attachment: 258112

Committed r188085: <http://trac.webkit.org/changeset/188085>
Comment 6 WebKit Commit Bot 2015-08-06 16:24:15 PDT
All reviewed patches have been landed.  Closing bug.