Bug 25490
| Summary: | ToNumber should ignore NBSP (\u00a0) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ash Searle <ash.searle> |
| Component: | JavaScriptCore | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Darin Adler
Committed r63120: <http://trac.webkit.org/changeset/63120>