Closed Bug 914908 Opened 12 years ago Closed 10 years ago

Typed arrays should coerce values with ToNumber

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 985733

People

(Reporter: nmatsakis, Unassigned)

Details

After executing: var x = new Float32Array(1); x[0] = [] x[0] should have the value 0, but in fact it has NaN. Justification: the WebIDL type of float32 arrays is unrestricted-float [1], first step to converting is to invoke ToNumber. ToNumber([]), though an incredibly convoluted series of steps, is 0. [1] http://www.w3.org/TR/WebIDL/#es-unrestricted-float
Note that both V8 and JSC produce 0. Dave
Assignee: general → nobody
No longer reproducible - Resolving as WFM.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → DUPLICATE
You need to log in before you can comment on or make changes to this bug.