Closed Bug 1113718 Opened 5 years ago Closed 5 years ago
Array constructor rounds wrong
new Uint8ClampedArray([2.6]) >>  x = new Uint8ClampedArray() x = 2.6 x >> 
Memo to self: need to check whether this affects SharedUint8ClampedArray too.
Tom, note that the bug here is really the opposite of what you reported. ToUint8Clamp is supposed to round, not to truncate: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8clamp. Ergo it's the conversion from the array-element (the first case in your test) that is buggy, not the conversion of assignment (the second case). (SharedTypedArray does not allow the construction from array literal, and the assignment case behaves correctly. Removing dependency.)
No longer blocks: shared-array-buffer
Sorry Lars, but I think you might be confused somehow. Like I said "Uint8ClampedArray constructor rounds wrong", which is the first case.
(In reply to Tom Schuster [:evilpie] from comment #3) > Sorry Lars, but I think you might be confused somehow. Like I said > "Uint8ClampedArray constructor rounds wrong", which is the first case. Indeed I misinterpreted the Summary.
Assignee: nobody → evilpies
Status: NEW → ASSIGNED
Attachment #8560436 - Flags: review?(lhansen)
You need to log in before you can comment on or make changes to this bug.