Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: src/objects-debug.cc

Issue 2407423002: [modules] Implement @@iterator on namespace objects. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 75320677c557e18bce4085eef8e3793614623ce0..525c226edadf470303ad9d8049c63eded77ccf1f 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -143,6 +143,9 @@ void HeapObject::HeapObjectVerify() {
case JS_MODULE_NAMESPACE_TYPE:
JSModuleNamespace::cast(this)->JSModuleNamespaceVerify();
break;
+ case JS_FIXED_ARRAY_ITERATOR_TYPE:
+ JSFixedArrayIterator::cast(this)->JSFixedArrayIteratorVerify();
+ break;
case JS_SET_TYPE:
JSSet::cast(this)->JSSetVerify();
break;
@@ -927,6 +930,15 @@ void JSModuleNamespace::JSModuleNamespaceVerify() {
module()->ObjectVerify();
}
+void JSFixedArrayIterator::JSFixedArrayIteratorVerify() {
+ CHECK(IsJSFixedArrayIterator());
+ CHECK(next()->IsJSFunction());
+ CHECK(array()->IsFixedArray());
+ VerifySmiField(kIndexOffset);
+
+ CHECK_LE(index(), array()->length());
+}
+
void Module::ModuleVerify() {
Isolate* isolate = GetIsolate();
CHECK(IsModule());
« src/factory.cc ('K') | « src/objects-body-descriptors-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698