https://codereview.chromium.org/1181903003/diff/60001/src/typedarray.js
File src/typedarray.js (right):

https://codereview.chromium.org/1181903003/diff/60001/src/typedarray.js#newcode139
src/typedarray.js:139: newIterable[symbolIterator] = function() { return
iterator; };
On 2015/06/13 00:49:24, caitp wrote:
On 2015/06/13 00:17:27, adamk wrote:
> Sadly this will fail if someone monkeypatches
Object.prototype[Symbol.iterator].
> I guess you could use %CreateDataProperty once it exists. But I'm
fine with
your
> previous code, changed to IS_SPEC_OBJECT with a TODO to make it
nicer l

The object can easily have a null prototype to avoid that. This
pattern could be
used in ArrayFrom and maybe other places too. Maybe that's not a bad
idea

Ah, yeah:

var newIterable = { __proto__: null };
newIterable[symbolIterator] = function() { return iterator; };

https://codereview.chromium.org/1181903003/

--
--
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