archives

« Bugzilla Issues Index

#2736 — 22.1.5.2.1 %ArrayIteratorPrototype%.next: Align result object creation with Map/LoaderIterator


22.1.5.2.1 %ArrayIteratorPrototype%.next(), steps 14-17:

The final steps in 22.1.5.2.1 could be slightly changed to follow the same structure as in [Map,Loader]IteratorPrototype.next().


---
14. If itemKind is "key" then, let result be index.
15. Else if itemKind is "value", then let result be elementValue.
16. Else
a. Assert: itemKind is "key+value".
b. Let result be ArrayCreate(2).
c. Assert: result is a new, well-formed Array object so the following operations will never fail.
d. Call CreateDataProperty(result, "0", index).
e. Call CreateDataProperty(result, "1", elementValue).
17. Return CreateIterResultObject(result, false).
---


fixed in rev25 editor's draft


in rev25