Fix Array::New(length) in the API to return an array with the provided length.
authorager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 16 Mar 2011 19:55:31 +0000 (19:55 +0000)
committerager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 16 Mar 2011 19:55:31 +0000 (19:55 +0000)
commit4f7fe371b28251382c9b710baebd914337d9b23c
tree253cf81b5ed4bf90f87cf34894506b9ce654e0a9
parenta20ee85139f24675b98d0891b893f80607f3f9c2
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

Review URL: http://codereview.chromium.org/6674034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
include/v8.h
src/api.cc
src/factory.cc
src/factory.h
test/cctest/test-api.cc