Commit cfd4a240 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Pass FixedArrayBase in elements.cc.

This avoids casting problems in case of empty_fixed_array as
FixedDoubleArray with size 0. This avoids prematurely shortcutting in
case of 0 all over the place, which in turn leads to errors.

Review URL: https://chromiumcodereview.appspot.com/11299226

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 349afd69
This diff is collapsed.
......@@ -2342,13 +2342,6 @@ void SeededNumberDictionary::set_requires_slow_elements() {
// Cast operations
FixedDoubleArray* FixedDoubleArray::castOrEmptyFixedArray(Object* object) {
ASSERT(object == HeapObject::cast(object)->GetHeap()->empty_fixed_array() ||
object->IsFixedDoubleArray());
return reinterpret_cast<FixedDoubleArray*>(object);
}
CAST_ACCESSOR(FixedArray)
CAST_ACCESSOR(FixedDoubleArray)
CAST_ACCESSOR(DescriptorArray)
......
......@@ -2489,7 +2489,6 @@ class FixedDoubleArray: public FixedArrayBase {
// Casting.
static inline FixedDoubleArray* cast(Object* obj);
static inline FixedDoubleArray* castOrEmptyFixedArray(Object* obj);
// Maximal allowed size, in bytes, of a single FixedDoubleArray.
// Prevents overflowing size computations, as well as extreme memory
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment