ARRAY_SIZE is not available on Linux-shared.

R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10718008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
rossberg@chromium.org 2012-06-28 16:40:16 +00:00
parent 680797234c
commit 32e01d224d

View File

@ -493,7 +493,7 @@ Handle<Value> Shell::CreateExternalArray(const Arguments& args,
ASSERT(!try_catch.HasCaught() && array_buffer->IsFunction());
Handle<Value> buffer_args[] = { Uint32::New(byteLength) };
Handle<Value> result = Handle<Function>::Cast(array_buffer)->NewInstance(
ARRAY_SIZE(buffer_args), buffer_args);
1, buffer_args);
if (try_catch.HasCaught()) return result;
buffer = result->ToObject();
}
@ -566,7 +566,7 @@ Handle<Value> Shell::SubArray(const Arguments& args) {
Handle<Value> construct_args[] = {
buffer, Uint32::New(byteOffset), Uint32::New(length)
};
return constructor->NewInstance(ARRAY_SIZE(construct_args), construct_args);
return constructor->NewInstance(3, construct_args);
}