Updates:
        Status: WorkingAsIntended

Comment #8 on issue 1940 by [email protected]: Chrome 17.0.963.46 & prototype1.7 conflict
http://code.google.com/p/v8/issues/detail?id=1940

There is no V8 bug.

Closure library expects that it can apply Array.prototype.filter to objects that behave like arrays but do not necessarily have Array.prototype as in their prototype chain. See for example: http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/array/array.js#234 . ECMA-262 intentionally specifies Array methods in a generic way to allow such kind usage.

Prototype however monkey patches Array.prototype with his own methods (including filter) which do not follow this ECMA-262 specification and expect that receiver will have Array.prototype in the prototype chain. It replaces Array.prototype.filter with it's own findAll function: https://github.com/sstephenson/prototype/blob/master/src/prototype/lang/enumerable.js#L299 which does not work for arbitrary array-like objects that do not have Array.prototype in the prototype chain.

Thus this is exception is fully expected.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to