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

Issue 6674034: Fix Array::New(length) in the API to return an array with the provided length. (Closed)

Created:
9 years, 9 months ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
Reviewers:
antonm
CC:
v8-dev
Visibility:
Public.

Description

Fix Array::New(length) in the API to return an array with the provided length. The internal factory method initializes the elements but does not set the length property of the array. Add array api test case for length. R=antonm@chromium.org BUG=v8:1256 TEST=cctest/test-api/Array Committed: http://code.google.com/p/v8/source/detail?r=7210

Patch Set 1 #

Patch Set 2 : Handle negative lengths. #

Patch Set 3 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -4 lines) Patch
M include/v8.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/api.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/factory.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/factory.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/test-api.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
9 years, 9 months ago (2011-03-16 19:26:32 UTC) #1
antonm
LGTM. Maybe rename Factory::NewJSArray argument to capacity instead of length in this change as well, ...
9 years, 9 months ago (2011-03-16 19:51:04 UTC) #2
Mads Ager (chromium)
9 years, 9 months ago (2011-03-16 19:54:20 UTC) #3
Thanks Anton. Argument name changed. :-)

Powered by Google App Engine
This is Rietveld 408576698