Reviewers: antonm,
Description:
Add an assert to ensure we never allocate second empty fixed array.
Please review this at http://codereview.chromium.org/3442012/show
Affected files:
M src/heap.cc
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index
25d199b189d5e881797fbf829495b4c5790c017d..6d46740b2ef7b9955261c42978f31dcd215ad3af
100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -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.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev