OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TOOLS_BLINK_GC_PLUGIN_CHECK_FIELDS_VISITOR_H_ | 5 #ifndef TOOLS_BLINK_GC_PLUGIN_CHECK_FIELDS_VISITOR_H_ |
6 #define TOOLS_BLINK_GC_PLUGIN_CHECK_FIELDS_VISITOR_H_ | 6 #define TOOLS_BLINK_GC_PLUGIN_CHECK_FIELDS_VISITOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "Edge.h" | 10 #include "Edge.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 kRawPtrToGCManaged, | 24 kRawPtrToGCManaged, |
25 kRefPtrToGCManaged, | 25 kRefPtrToGCManaged, |
26 kReferencePtrToGCManaged, | 26 kReferencePtrToGCManaged, |
27 kOwnPtrToGCManaged, | 27 kOwnPtrToGCManaged, |
28 kMemberToGCUnmanaged, | 28 kMemberToGCUnmanaged, |
29 kMemberInUnmanaged, | 29 kMemberInUnmanaged, |
30 kPtrFromHeapToStack, | 30 kPtrFromHeapToStack, |
31 kGCDerivedPartObject | 31 kGCDerivedPartObject |
32 }; | 32 }; |
33 | 33 |
34 typedef std::vector<std::pair<FieldPoint*, Error> > Errors; | 34 using Errors = std::vector<std::pair<FieldPoint*, Error>>; |
35 | 35 |
36 explicit CheckFieldsVisitor(const BlinkGCPluginOptions& options); | 36 CheckFieldsVisitor(); |
37 | 37 |
38 Errors& invalid_fields(); | 38 Errors& invalid_fields(); |
39 | 39 |
40 bool ContainsInvalidFields(RecordInfo* info); | 40 bool ContainsInvalidFields(RecordInfo* info); |
41 | 41 |
42 void AtMember(Member* edge) override; | 42 void AtMember(Member* edge) override; |
43 void AtValue(Value* edge) override; | 43 void AtValue(Value* edge) override; |
44 void AtCollection(Collection* edge) override; | 44 void AtCollection(Collection* edge) override; |
45 | 45 |
46 private: | 46 private: |
47 Error InvalidSmartPtr(Edge* ptr); | 47 Error InvalidSmartPtr(Edge* ptr); |
48 | 48 |
49 const BlinkGCPluginOptions& options_; | |
50 FieldPoint* current_; | 49 FieldPoint* current_; |
51 bool stack_allocated_host_; | 50 bool stack_allocated_host_; |
52 bool managed_host_; | 51 bool managed_host_; |
53 Errors invalid_fields_; | 52 Errors invalid_fields_; |
54 }; | 53 }; |
55 | 54 |
56 #endif // TOOLS_BLINK_GC_PLUGIN_CHECK_FIELDS_VISITOR_H_ | 55 #endif // TOOLS_BLINK_GC_PLUGIN_CHECK_FIELDS_VISITOR_H_ |
OLD | NEW |