Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index 40132cbf6b050f5da85ce18b2dcf02184f512615..d21e65e01eb155bc57113a97041507a8df223e74 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -170,6 +170,12 @@ void HeapObject::HeapObjectVerify() { |
case JS_MAP_TYPE: |
JSMap::cast(this)->JSMapVerify(); |
break; |
+ case JS_SET_ITERATOR_TYPE: |
+ JSSetIterator::cast(this)->JSSetIteratorVerify(); |
+ break; |
+ case JS_MAP_ITERATOR_TYPE: |
+ JSMapIterator::cast(this)->JSMapIteratorVerify(); |
+ break; |
case JS_WEAK_MAP_TYPE: |
JSWeakMap::cast(this)->JSWeakMapVerify(); |
break; |
@@ -711,6 +717,7 @@ void JSSet::JSSetVerify() { |
JSObjectVerify(); |
VerifyHeapPointer(table()); |
CHECK(table()->IsOrderedHashTable() || table()->IsUndefined()); |
+ // TODO(arv): Verify OrderedHashTable too. |
} |
@@ -719,6 +726,39 @@ void JSMap::JSMapVerify() { |
JSObjectVerify(); |
VerifyHeapPointer(table()); |
CHECK(table()->IsOrderedHashTable() || table()->IsUndefined()); |
+ // TODO(arv): Verify OrderedHashTable too. |
+} |
+ |
+ |
+void JSSetIterator::JSSetIteratorVerify() { |
+ CHECK(IsJSSetIterator()); |
+ JSObjectVerify(); |
+ VerifyHeapPointer(table()); |
+ CHECK(table()->IsOrderedHashTable() || table()->IsUndefined()); |
+ CHECK(index()->IsSmi()); |
+ CHECK(count()->IsSmi()); |
+ CHECK(kind()->IsSmi()); |
+ VerifyHeapPointer(next_iterator()); |
+ CHECK(next_iterator()->IsJSSetIterator() || next_iterator()->IsUndefined()); |
+ VerifyHeapPointer(table()); |
+ CHECK(previous_iterator()->IsJSSetIterator() |
+ || previous_iterator()->IsUndefined()); |
+} |
+ |
+ |
+void JSMapIterator::JSMapIteratorVerify() { |
+ CHECK(IsJSMapIterator()); |
+ JSObjectVerify(); |
+ VerifyHeapPointer(table()); |
+ CHECK(table()->IsOrderedHashTable() || table()->IsUndefined()); |
+ CHECK(index()->IsSmi()); |
+ CHECK(count()->IsSmi()); |
+ CHECK(kind()->IsSmi()); |
+ VerifyHeapPointer(next_iterator()); |
+ CHECK(next_iterator()->IsJSMapIterator() || next_iterator()->IsUndefined()); |
+ VerifyHeapPointer(table()); |
+ CHECK(previous_iterator()->IsJSMapIterator() |
+ || previous_iterator()->IsUndefined()); |
} |