| 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 e5d69f0b897c0a13e8b0b0cbdc2b544632b38272..396ed95bf1cfea3de07cc57799a899c8e2678101 100644
|
| --- a/tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp
|
| +++ b/tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp
|
| @@ -86,6 +86,7 @@ void CheckFieldsVisitor::AtValue(Value* edge) {
|
|
|
| // Disallow OwnPtr<T>, RefPtr<T> and T* to stack-allocated types.
|
| if (Parent()->IsOwnPtr() ||
|
| + Parent()->IsUniquePtr() ||
|
| Parent()->IsRefPtr() ||
|
| (stack_allocated_host_ && Parent()->IsRawPtr())) {
|
| invalid_fields_.push_back(std::make_pair(
|
| @@ -103,6 +104,8 @@ void CheckFieldsVisitor::AtValue(Value* edge) {
|
| void CheckFieldsVisitor::AtCollection(Collection* edge) {
|
| if (edge->on_heap() && Parent() && Parent()->IsOwnPtr())
|
| invalid_fields_.push_back(std::make_pair(current_, kOwnPtrToGCManaged));
|
| + if (edge->on_heap() && Parent() && Parent()->IsUniquePtr())
|
| + invalid_fields_.push_back(std::make_pair(current_, kUniquePtrToGCManaged));
|
| }
|
|
|
| CheckFieldsVisitor::Error CheckFieldsVisitor::InvalidSmartPtr(Edge* ptr) {
|
| @@ -116,5 +119,7 @@ CheckFieldsVisitor::Error CheckFieldsVisitor::InvalidSmartPtr(Edge* ptr) {
|
| return kRefPtrToGCManaged;
|
| if (ptr->IsOwnPtr())
|
| return kOwnPtrToGCManaged;
|
| + if (ptr->IsUniquePtr())
|
| + return kUniquePtrToGCManaged;
|
| assert(false && "Unknown smart pointer kind");
|
| }
|
|
|