Comment #3 on issue 3568 by [email protected]: Generator Prototype should have an object between itself and Object.prototype
https://code.google.com/p/v8/issues/detail?id=3568

As noted in issue 3897, this is a problem with *all* iterator prototypes (not just for generators).

25.1.2 The %IteratorPrototype% Object

The value of the [[Prototype]] internal slot of the %IteratorPrototype% object is the intrinsic object %ObjectPrototype% (19.1.3). The %IteratorPrototype% object is an ordinary object. The initial value of the [[Extensible]] internal slot of the
%IteratorPrototype% object is true.

NOTE All objects defined in this specification that implement the Iterator interface also inherit from %IteratorPrototype%. ECMAScript code may also define objects that inherit from %IteratorPrototype%. The %IteratorPrototype% object provides a place where additional methods that are applicable to all iterator objects may be added.

The following expression is one way that ECMAScript code can access the %IteratorPrototype% object:

     Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))

(source: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-%iteratorprototype%-object)

but in V8 today, this value is the ObjectPrototype itself:

d8> Object.prototype === Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))
    true

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to