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

Unified Diff: src/objects-debug.cc

Issue 2348493003: [builtins] move String.prototype[@@iterator] to C++ builtin (Closed)
Patch Set: V6 (cleanup) Created 4 years, 3 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 b860e73d150b9ce06c62b7baf54f5936d5cb341c..a3c29a4a536c908793918c7903342de27ad1395a 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -152,6 +152,9 @@ void HeapObject::HeapObjectVerify() {
case JS_MAP_ITERATOR_TYPE:
JSMapIterator::cast(this)->JSMapIteratorVerify();
break;
+ case JS_STRING_ITERATOR_TYPE:
+ JSStringIterator::cast(this)->JSStringIteratorVerify();
+ break;
case JS_WEAK_MAP_TYPE:
JSWeakMap::cast(this)->JSWeakMapVerify();
break;
@@ -781,6 +784,13 @@ void JSWeakMap::JSWeakMapVerify() {
CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
}
+void JSStringIterator::JSStringIteratorVerify() {
+ CHECK(IsJSStringIterator());
+ JSObjectVerify();
+ CHECK(string()->IsString());
+ CHECK_GE(index(), 0);
+ CHECK_LE(index(), String::kMaxLength);
+}
void JSWeakSet::JSWeakSetVerify() {
CHECK(IsJSWeakSet());
« src/objects.h ('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