Closed Bug 1201089 Opened 4 years ago Closed 4 years ago

ES6 Iterator prototype chains

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1225396
Tracking Status
firefox43 --- affected

People

(Reporter: jorendorff, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [mentor=jorendorff])

All builtin iterators in ES6 inherit from a common prototype, %IteratorPrototyp%. It has an @@iterator method that just does `return this;`.

http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%iteratorprototype%-object

This affects at least Array, String, Map, and Set iterators, as well as Generator .prototype objects.

It is also supposed to affect the iterator produced by Reflect.enumerate(obj) for non-proxy objects obj, but we don't implement that yet.
Depends on: 1091945
Note that we need a sane Symbol.iterator on %IteratorPrototype% for bindings code too.  I'm adding a workaround for now, but we should remove that once this is fixed....
Blocks: 1225395, 1225396
Posted patches for this in bug 1225396.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1225396
You need to log in before you can comment on or make changes to this bug.