mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
b94ccc7ec3
The spec says parseInt needs to convert to a string before being converted to an integer. For 1e+21 (and greater), ToString uses exponential notation: "1e+21", which get's parsed as 1. The existing parseInt fast path for doubles converted it directly into an integer, giving the result 1e21. The fix adds a bounds check to see if the exponential notation is triggered, and still uses the fast path if not. |
||
---|---|---|
.. | ||
ipc | ||
jetpack | ||
jsd | ||
src |