[webkit-reviews] review granted: [Bug 9697] parseInt results may be inaccurate for numbers greater than 2^53 : [Attachment 15544] Revised proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 17 10:37:07 PDT 2007


Darin Adler <darin at apple.com> has granted Cameron Zwarich (cpst)
<cwzwarich at uwaterloo.ca>'s request for review:
Bug 9697: parseInt results may be inaccurate for numbers greater than 2^53
http://bugs.webkit.org/show_bug.cgi?id=9697

Attachment 15544: Revised proposed patch
http://bugs.webkit.org/attachment.cgi?id=15544&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
Some nice improvements.

r=me

I still don't understand why you need to check for "inf". Wouldn't a check for
"i" be good enough?

No need for else after return and you could probably simplify the logic and
just have one return NaN.

+	     number = parseIntOverflow(s.substr(firstDigitPosition).ascii(), p
- firstDigitPosition, radix);

Could use substr(firstDigitPosition, p - firstDigitPosition) here -- more
consistent with the expression above.



More information about the webkit-reviews mailing list