Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Issue 3358025: Fix bug in Array.prototype.indexOf/lastIndexOf when called on non-sparse non-arrays. (Closed)

Created:
10 years, 3 months ago by Lasse Reichstein
Modified:
9 years, 6 months ago
Reviewers:
Rico
CC:
v8-dev
Visibility:
Public.

Description

Fix bug in Array.prototype.indexOf/lastIndexOf when called on non-sparse non-arrays.

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix comment to match expanded behavior #

Patch Set 3 : Addressed reiew comments. #

Patch Set 4 : Few more tests and lint fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -5 lines) Patch
M src/runtime.cc View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download
M test/mjsunit/array-indexing.js View 1 2 3 4 chunks +40 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
10 years, 3 months ago (2010-09-10 08:04:33 UTC) #1
Rico
LGTM http://codereview.chromium.org/3358025/diff/1/2 File src/runtime.cc (right): http://codereview.chromium.org/3358025/diff/1/2#newcode7985 src/runtime.cc:7985: // How many elements does this array have? ...
10 years, 3 months ago (2010-09-10 08:11:58 UTC) #2
Lasse Reichstein
10 years, 3 months ago (2010-09-10 08:18:17 UTC) #3
http://codereview.chromium.org/3358025/diff/1/2
File src/runtime.cc (right):

http://codereview.chromium.org/3358025/diff/1/2#newcode7985
src/runtime.cc:7985: // How many elements does this array have?
Done

http://codereview.chromium.org/3358025/diff/1/3
File test/mjsunit/array-indexing.js (right):

http://codereview.chromium.org/3358025/diff/1/3#newcode103
test/mjsunit/array-indexing.js:103: assertEquals(100000,
Array.prototype.indexOf.call(sparse_object, 37));
Done, and added tests where there are values after the length field.

Powered by Google App Engine
This is Rietveld 408576698