Add an assert to ensure we never allocate second empty fixed array.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
vitalyr@chromium.org 2010-09-23 12:49:59 +00:00
parent 48fd3dcaf9
commit 740aba98fb

View File

@ -3195,6 +3195,7 @@ Object* Heap::AllocateRawFixedArray(int length) {
if (length < 0 || length > FixedArray::kMaxLength) {
return Failure::OutOfMemoryException();
}
ASSERT(length > 0);
// Use the general function if we're forced to always allocate.
if (always_allocate()) return AllocateFixedArray(length, TENURED);
// Allocate the raw data for a fixed array.