convert NaN correctly with typed array array conversion

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: vlad, Assigned: vlad)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

currently, new Int32Array([NaN])[0] != 0 like it should be, because the code that creates a new typed array from an existing array isn't handling NaN values correctly.  The attached patch fixes that.
Attachment #503632 - Flags: review?(jwalden+bmo)
Comment on attachment 503632 [details] [diff] [review]
typedarray nan conversion fix

Those casts have undefined behavior in C/C++, right?  So currently you have no idea what you'll get there, right?  Doesn't really matter, just curious and suspect you already looked at a spec, whereas I'd have to make an effort to look.  ;-)
Attachment #503632 - Flags: review?(jwalden+bmo) → review+
Comment on attachment 503632 [details] [diff] [review]
typedarray nan conversion fix

asking for a2.0 -- typed array bug, and affects a webgl test that checks typed arrays.
Attachment #503632 - Flags: approval2.0?
Attachment #503632 - Flags: approval2.0? → approval2.0+
http://hg.mozilla.org/mozilla-central/rev/9caa011615ff
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.