| Index: tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
|
| diff --git a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
|
| index 0ea8f4cac36330f042492810e86e52989a56a7ab..d1d3a468ec88b1af5cdd8d145716e059d8239862 100644
|
| --- a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
|
| +++ b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
|
| @@ -486,7 +486,7 @@ class CheckFieldsVisitor : public RecursiveEdgeVisitor {
|
| return !invalid_fields_.empty();
|
| }
|
|
|
| - void VisitMember(Member* edge) override {
|
| + void AtMember(Member* edge) override {
|
| if (managed_host_)
|
| return;
|
| // A member is allowed to appear in the context of a root.
|
| @@ -499,7 +499,7 @@ class CheckFieldsVisitor : public RecursiveEdgeVisitor {
|
| invalid_fields_.push_back(std::make_pair(current_, kMemberInUnmanaged));
|
| }
|
|
|
| - void VisitValue(Value* edge) override {
|
| + void AtValue(Value* edge) override {
|
| // TODO: what should we do to check unions?
|
| if (edge->value()->record()->isUnion())
|
| return;
|
| @@ -540,6 +540,11 @@ class CheckFieldsVisitor : public RecursiveEdgeVisitor {
|
| }
|
| }
|
|
|
| + void AtCollection(Collection* edge) override {
|
| + if (edge->on_heap() && Parent() && Parent()->IsOwnPtr())
|
| + invalid_fields_.push_back(std::make_pair(current_, kOwnPtrToGCManaged));
|
| + }
|
| +
|
| private:
|
| Error InvalidSmartPtr(Edge* ptr) {
|
| if (ptr->IsRawPtr())
|
|
|