| Index: src/objects-debug.cc
|
| diff --git a/src/objects-debug.cc b/src/objects-debug.cc
|
| index 3eb7817b1aa2623ecf9d6d2e184612c6ae0b09cf..87e657a8a86bd55bd55c68b1fed8ebec56704de4 100644
|
| --- a/src/objects-debug.cc
|
| +++ b/src/objects-debug.cc
|
| @@ -328,11 +328,17 @@ void JSObject::JSObjectVerify() {
|
| }
|
| }
|
| }
|
| - CHECK_EQ((map()->has_fast_smi_or_object_elements() ||
|
| - (elements() == GetHeap()->empty_fixed_array())),
|
| - (elements()->map() == GetHeap()->fixed_array_map() ||
|
| - elements()->map() == GetHeap()->fixed_cow_array_map()));
|
| - CHECK(map()->has_fast_object_elements() == HasFastObjectElements());
|
| +
|
| + // TODO(hpayer): deal gracefully with partially constructed JSObjects, when
|
| + // allocation folding is turned off.
|
| + if (reinterpret_cast<Map*>(elements()) !=
|
| + GetHeap()->one_pointer_filler_map()) {
|
| + CHECK_EQ((map()->has_fast_smi_or_object_elements() ||
|
| + (elements() == GetHeap()->empty_fixed_array())),
|
| + (elements()->map() == GetHeap()->fixed_array_map() ||
|
| + elements()->map() == GetHeap()->fixed_cow_array_map()));
|
| + CHECK(map()->has_fast_object_elements() == HasFastObjectElements());
|
| + }
|
| }
|
|
|
|
|
| @@ -675,9 +681,19 @@ void Code::VerifyEmbeddedMapsDependency() {
|
| void JSArray::JSArrayVerify() {
|
| JSObjectVerify();
|
| CHECK(length()->IsNumber() || length()->IsUndefined());
|
| - CHECK(elements()->IsUndefined() ||
|
| - elements()->IsFixedArray() ||
|
| - elements()->IsFixedDoubleArray());
|
| + // TODO(hpayer): deal gracefully with partially constructed JSObjects, when
|
| + // allocation folding is turned off.
|
| + if (reinterpret_cast<Map*>(elements()) !=
|
| + GetHeap()->one_pointer_filler_map()) {
|
| + CHECK(elements()->IsUndefined() ||
|
| + elements()->IsFixedArray() ||
|
| + elements()->IsFixedDoubleArray());
|
| + // TODO(mvstanton): to diagnose chromium bug 284577, remove after.
|
| + AllocationMemento* memento = AllocationMemento::FindForJSObject(this);
|
| + if (memento != NULL && memento->IsValid()) {
|
| + memento->AllocationMementoVerify();
|
| + }
|
| + }
|
| }
|
|
|
|
|
|
|