Closed
Bug 914908
Opened 12 years ago
Closed 10 years ago
Typed arrays should coerce values with ToNumber
Categories
(Core :: JavaScript Engine, defect)
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
Comment 1•12 years ago
|
||
Note that both V8 and JSC produce 0.
Dave
Assignee | ||
Updated•11 years ago
|
Assignee: general → nobody
Comment 2•10 years ago
|
||
No longer reproducible - Resolving as WFM.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Updated•10 years ago
|
Resolution: WORKSFORME → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•