Index: tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp |
diff --git a/tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp b/tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp |
index 396ed95bf1cfea3de07cc57799a899c8e2678101..05419da6d67eb71958ecd944bf247bfe3803fee9 100644 |
--- a/tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp |
+++ b/tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp |
@@ -47,6 +47,14 @@ void CheckFieldsVisitor::AtMember(Member* edge) { |
invalid_fields_.push_back(std::make_pair(current_, kMemberInUnmanaged)); |
} |
+void CheckFieldsVisitor::AtIterator(Iterator* edge) { |
+ if (!managed_host_) |
+ return; |
+ |
+ if (edge->IsUnsafe()) |
+ invalid_fields_.push_back(std::make_pair(current_, kIteratorToGCManaged)); |
+} |
+ |
void CheckFieldsVisitor::AtValue(Value* edge) { |
// TODO: what should we do to check unions? |
if (edge->value()->record()->isUnion()) |