Last Comment Bug 659894 - Firefox 3.6 is the only browser that treats the text "INF" as a number (same for the text INFINITY)
: Firefox 3.6 is the only browser that treats the text "INF" as a number (same ...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: 1.9.2 Branch
: x86 Windows 7
: -- normal (vote)
: ---
Assigned To: general
:
Mentors:
javascript:alert(isNaN("INF"))
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-26 02:38 PDT by jeanyce
Modified: 2012-07-16 03:39 PDT (History)
6 users (show)
Ms2ger: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description jeanyce 2011-05-26 02:38:28 PDT
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
Build Identifier: 3.6.17

Chrome          isNaN("INF") : true
Chrome Canary   isNaN("INF") : true
IE9             isNaN("INF") : true
IE8             isNaN("INF") : true
IE7             isNaN("INF") : true
IE6             isNaN("INF") : true
Firefox 4       isNaN("INF") : true
Firefox 3.6     isNaN("INF") : false
Firefox 2       isNaN("INF") : true

Reproducible: Always

Steps to Reproduce:
1. Type javascript:alert(isNaN("INF")) in the URL bar and press ENTER

Actual Results:  
2. Firefox 3.6 will display false
3. All other browsers display true

Expected Results:  
true (the String "INF" should not be treated like a number)
Comment 1 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-05-26 09:39:29 PDT
I suspect this is wontfix unless there's a clear security or major compatibility (as in, actual major sites broken) issue here.
Comment 2 j.j. 2011-05-26 11:15:00 PDT
Firefox 3.5     isNaN("INF") : false
Firefox 3.0     isNaN("INF") : true
Comment 3 Cork 2011-05-28 03:35:02 PDT
Just to have it documented:

Caused by bug 384244 (Firefox 3.1a2pre 2008-08-06)
http://hg.mozilla.org/mozilla-central/rev/1b24f8e54d1b

Fixed by bug 613492 (Firefox 4.0b8pre 2010-11-26)
http://hg.mozilla.org/tracemonkey/rev/222c29336422
Comment 4 Cork 2011-05-28 03:36:33 PDT
bah the ref links is mixed up.. its 

Caused by bug 384244 (Firefox 3.1a2pre 2008-08-06)
http://hg.mozilla.org/tracemonkey/rev/222c29336422

Fixed by bug 613492 (Firefox 4.0b8pre 2010-11-26)
http://hg.mozilla.org/mozilla-central/rev/1b24f8e54d1b
Comment 5 j.j. 2012-07-16 01:17:04 PDT
This is FIXED in Fx4 (and WONTFIX in Fx3.6)

Note You need to log in before you can comment on or make changes to this bug.