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

Unified Diff: tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp

Issue 1433883003: GC plugin: RefPtr<T> is legal if T is RefCountedGC-derived. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/Config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0ed953fccf92e57197fcb7cc54a99bff36b8a675..558637c9c190b5489e0ddccf37b0c62f921568af 100644
--- a/tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp
+++ b/tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp
@@ -107,7 +107,13 @@ void CheckFieldsVisitor::AtValue(Value* edge) {
return;
}
- if (Parent()->IsRawPtr() || Parent()->IsRefPtr() || Parent()->IsOwnPtr()) {
+ if (Parent()->IsRawPtr() || Parent()->IsOwnPtr()) {
+ invalid_fields_.push_back(std::make_pair(
+ current_, InvalidSmartPtr(Parent())));
+ return;
+ }
+
+ if (Parent()->IsRefPtr() && !edge->value()->IsGCRefCounted()) {
invalid_fields_.push_back(std::make_pair(
current_, InvalidSmartPtr(Parent())));
return;
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/Config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698