-
dsmith authored
Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=12963 Fix some inconsistencies in the Mozilla JS Array extras implementations with respect to the Mozilla implementation: - holes in arrays should be skipped, not treated as undefined, by all such methods - an element with value undefined is not a hole - Array.prototype.forEach should return undefined * kjs/array_object.cpp: (ArrayInstance::getOwnPropertySlot): (ArrayProtoFunc::callAsFunction): LayoutTests: Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=12963 Fix some inconsistencies in the Mozilla JS Array extras implementations with respect to the Mozilla implementation: - holes in arrays should be skipped, not treated as undefined, by all such methods - an element with value undefined is not a hole - Array.prototype.forEach should return undefined * fast/js/array-every-expected.txt: * fast/js/array-filter-expected.txt: Added. * fast/js/array-filter.html: Added. * fast/js/array-foreach-expected.txt: * fast/js/array-foreach.html: * fast/js/array-indexof-expected.txt: * fast/js/array-indexof.html: * fast/js/array-lastIndexOf-expected.txt: * fast/js/array-map-expected.txt: Added. * fast/js/array-map.html: Added. * fast/js/array-some-expected.txt: * fast/js/array-some.html: * fast/js/resources/array-every.js: * fast/js/resources/array-lastIndexOf.js: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ebd6d4e5