Closed Bug 795227 Opened 8 years ago Closed 8 years ago
Array should check length range like Array
Currently ParallelArray operations that take a length as an argument, such as the comprehension form, simply coerce the argument to uint32_t. It should report RangeError when the argument is out of uint32_t range and TypeError when it is NaN.
Assignee: general → shu
Erratum: MOZ_DOUBLE_IS_NaN should be !MOZ_DOUBLE_IS_FINITE
Comment on attachment 665807 [details] [diff] [review] fix and testcases It might be nicer if the ToUint32 + malformed reporting was combined into one function.
Attachment #665807 - Flags: review?(dvander) → review+
(In reply to David Anderson [:dvander] from comment #3) > Comment on attachment 665807 [details] [diff] [review] > fix and testcases > > It might be nicer if the ToUint32 + malformed reporting was combined into > one function. That makes things less flexible. Not every malformed input is an error. If I use .get on a PA with a malformed index vector, undefined is returned. That behavior could change in the future, but that's what it is now.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.