Reviewers: Michael Starzinger,
Description:
ARRAY_SIZE is not available on Linux-shared.
[email protected]
BUG=
TEST=
Please review this at https://chromiumcodereview.appspot.com/10718008/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/d8.cc
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index
89de773d9ff0c39f98e934d6510326af905e0cf9..b3afcfe4e0fd4251d13142afcf530ecb0892d193
100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -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);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev