Bug 25490

Summary: ToNumber should ignore NBSP (\u00a0)
Product: WebKit Reporter: Ash Searle <ash.searle>
Component: JavaScriptCoreAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://hexmen.com/tests/pushpop.html

Ash Searle
Reported 2009-04-30 13:14:04 PDT
This bug in ToNumber is the only reason WebKit fails a couple of array push/pop tests at the given URL. For a minimal test-case - do an unsigned right-shift as below. Every case should result in 3, but we get an answer of 0 when there's a non-breaking space: '\u0009 3' >>> 0; /* tab */ '\u0020 3' >>> 0; /* space */ '\u00a0 3' >>> 0; /* nbsp - fail! */ (see Section 9.3.1 of the EcmaScript 3rd edition spec for full list of white-space characters)
Attachments
Darin Adler
Comment 1 2010-07-12 14:33:22 PDT
Note You need to log in before you can comment on or make changes to this bug.