diff --git a/src/d8.cc b/src/d8.cc index 89de773d9f..b3afcfe4e0 100644 --- a/src/d8.cc +++ b/src/d8.cc @@ -493,7 +493,7 @@ Handle Shell::CreateExternalArray(const Arguments& args, ASSERT(!try_catch.HasCaught() && array_buffer->IsFunction()); Handle buffer_args[] = { Uint32::New(byteLength) }; Handle result = Handle::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 Shell::SubArray(const Arguments& args) { Handle construct_args[] = { buffer, Uint32::New(byteOffset), Uint32::New(length) }; - return constructor->NewInstance(ARRAY_SIZE(construct_args), construct_args); + return constructor->NewInstance(3, construct_args); }