Per https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.findindex and https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.find, these methods should not skip holes.
Created attachment 253666 [details] Patch
Comment on attachment 253666 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253666&action=review > LayoutTests/js/script-tests/array-find.js:49 > +arrayWithHoles[7] = ""; Coulld you add non-arrayhole `undefined` case? > LayoutTests/js/script-tests/array-findIndex.js:49 > +arrayWithHoles[7] = ""; Ditto
(In reply to comment #2) > Comment on attachment 253666 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=253666&action=review > > > LayoutTests/js/script-tests/array-find.js:49 > > +arrayWithHoles[7] = ""; > > Coulld you add non-arrayhole `undefined` case? > > > LayoutTests/js/script-tests/array-findIndex.js:49 > > +arrayWithHoles[7] = ""; > > Ditto Both of those already exist in the test files, higher up. `shouldBe("[undefined, 0, null, false, ''].find(passUndefined)", "undefined");` and `shouldBe("[undefined, 0, null, false, ''].findIndex(passUndefined)", "0");`
Comment on attachment 253666 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253666&action=review >>> LayoutTests/js/script-tests/array-find.js:49 >>> +arrayWithHoles[7] = ""; >> >> Coulld you add non-arrayhole `undefined` case? > > Both of those already exist in the test files, higher up. `shouldBe("[undefined, 0, null, false, ''].find(passUndefined)", "undefined");` and `shouldBe("[undefined, 0, null, false, ''].findIndex(passUndefined)", "0");` OK, make sense. Nice catch!
Comment on attachment 253666 [details] Patch Clearing flags on attachment: 253666 Committed r184848: <http://trac.webkit.org/changeset/184848>
All reviewed patches have been landed. Closing bug.