Closed Bug 795227 Opened 13 years ago Closed 13 years ago

ParallelArray should check length range like Array

Categories

(Core :: JavaScript Engine, defect)

x86_64
All
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: shu, Assigned: shu)

Details

Attachments

(1 file)

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.
Severity: normal → minor
OS: Linux → All
Assignee: general → shu
Flags: in-testsuite+
Attachment #665807 - Flags: review?(dvander)
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: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: