Revision: 5514
Author: [email protected]
Date: Thu Sep 23 05:49:59 2010
Log: Add an assert to ensure we never allocate second empty fixed array.

Review URL: http://codereview.chromium.org/3442012
http://code.google.com/p/v8/source/detail?r=5514

Modified:
 /branches/bleeding_edge/src/heap.cc

=======================================
--- /branches/bleeding_edge/src/heap.cc Thu Sep 23 05:23:35 2010
+++ /branches/bleeding_edge/src/heap.cc Thu Sep 23 05:49:59 2010
@@ -3195,6 +3195,7 @@
   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.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to