| Index: src/objects-debug.cc
|
| diff --git a/src/objects-debug.cc b/src/objects-debug.cc
|
| index 90b01934dfec256e8e1abb081ea467f819095679..f59687af9d0acef22841fe3b8273cac0dd7decd2 100644
|
| --- a/src/objects-debug.cc
|
| +++ b/src/objects-debug.cc
|
| @@ -243,6 +243,7 @@ void Symbol::SymbolVerify() {
|
| CHECK(HasHashCode());
|
| CHECK_GT(Hash(), 0);
|
| CHECK(name()->IsUndefined() || name()->IsString());
|
| + CHECK(flags()->IsSmi());
|
| }
|
|
|
|
|
| @@ -306,6 +307,13 @@ void ExternalDoubleArray::ExternalDoubleArrayVerify() {
|
| }
|
|
|
|
|
| +bool JSObject::ElementsAreSafeToExamine() {
|
| + return (FLAG_use_gvn && FLAG_use_allocation_folding) ||
|
| + reinterpret_cast<Map*>(elements()) !=
|
| + GetHeap()->one_pointer_filler_map();
|
| +}
|
| +
|
| +
|
| void JSObject::JSObjectVerify() {
|
| VerifyHeapPointer(properties());
|
| VerifyHeapPointer(elements());
|
| @@ -335,9 +343,7 @@ void JSObject::JSObjectVerify() {
|
|
|
| // If a GC was caused while constructing this object, the elements
|
| // pointer may point to a one pointer filler map.
|
| - if ((FLAG_use_gvn && FLAG_use_allocation_folding) ||
|
| - (reinterpret_cast<Map*>(elements()) !=
|
| - GetHeap()->one_pointer_filler_map())) {
|
| + if (ElementsAreSafeToExamine()) {
|
| CHECK_EQ((map()->has_fast_smi_or_object_elements() ||
|
| (elements() == GetHeap()->empty_fixed_array())),
|
| (elements()->map() == GetHeap()->fixed_array_map() ||
|
| @@ -698,9 +704,7 @@ void JSArray::JSArrayVerify() {
|
| CHECK(length()->IsNumber() || length()->IsUndefined());
|
| // If a GC was caused while constructing this array, the elements
|
| // pointer may point to a one pointer filler map.
|
| - if ((FLAG_use_gvn && FLAG_use_allocation_folding) ||
|
| - (reinterpret_cast<Map*>(elements()) !=
|
| - GetHeap()->one_pointer_filler_map())) {
|
| + if (ElementsAreSafeToExamine()) {
|
| CHECK(elements()->IsUndefined() ||
|
| elements()->IsFixedArray() ||
|
| elements()->IsFixedDoubleArray());
|
|
|