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

Unified Diff: src/objects-debug.cc

Issue 2348493003: [builtins] move String.prototype[@@iterator] to C++ builtin (Closed)
Patch Set: V5 (try to make gcmole happy) 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..9957d6feac1bbcc279e83a5b570f2e6b4b1de77e 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,12 @@ void JSWeakMap::JSWeakMapVerify() {
CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
}
+void JSStringIterator::JSStringIteratorVerify() {
+ CHECK(IsJSStringIterator());
+ JSObjectVerify();
+ CHECK(string()->IsString());
+ CHECK(index_object()->IsSmi());
Benedikt Meurer 2016/09/19 04:05:18 Replace this with: CHECK_LE(0, index()); CHECK_LE
caitp 2016/09/19 16:03:05 Done.
+}
void JSWeakSet::JSWeakSetVerify() {
CHECK(IsJSWeakSet());

Powered by Google App Engine
This is Rietveld 408576698