« Bugzilla Issues Index
#4536 — 24.2.1.2 SetViewValue: Missing call to ToNumber
- bug_id:
4536
- creation_ts:
2015-09-18 07:22:00 -0700
- short_desc:
24.2.1.2 SetViewValue: Missing call to ToNumber
- delta_ts:
2015-10-26 12:50:03 -0700
- product:
ECMA-262 Edition 6
- component:
technical issues
- version:
unspecified
- rep_platform:
All
- op_sys:
All
- bug_status:
CONFIRMED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- cc:
brterlso
- commentid:
14698
- comment_count:
0
- who:
André Bargull
- bug_when:
2015-09-18 07:22:46 -0700
24.2.1.2 SetViewValue ( view, requestIndex, isLittleEndian, type, value )
SetViewValue calls SetValueInBuffer without converting the `value` argument to a number. This is invalid because SetValueInBuffer only accepts a numeric `value` argument.
Change SetViewValue, step 15 to:
---
15. Let numValue be ToNumber(value).
16. ReturnIfAbrupt(numValue).
17. If IsDetachedBuffer(buffer) is true, throw a TypeError exception.
18. Return SetValueInBuffer(buffer, bufferIndex, type, numValue, isLittleEndian).
---
- commentid:
14876
- comment_count:
1
- who:
Brian Terlson
- bug_when:
2015-10-26 12:50:03 -0700
Fixed in ES2016 Draft (4f875fe).