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_BLINK_GC_PLUGIN_OPTIONS_H_ | 5 #ifndef TOOLS_BLINK_GC_PLUGIN_BLINK_GC_PLUGIN_OPTIONS_H_ |
6 #define TOOLS_BLINK_GC_PLUGIN_BLINK_GC_PLUGIN_OPTIONS_H_ | 6 #define TOOLS_BLINK_GC_PLUGIN_BLINK_GC_PLUGIN_OPTIONS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 struct BlinkGCPluginOptions { | 12 struct BlinkGCPluginOptions { |
13 bool dump_graph = false; | 13 bool dump_graph = false; |
14 | 14 |
15 // If |true|, emit warning for class types which derive from from | 15 // If |true|, emit warning for class types which derive from from |
16 // GarbageCollectedFinalized<> when just GarbageCollected<> will do. | 16 // GarbageCollectedFinalized<> when just GarbageCollected<> will do. |
17 bool warn_unneeded_finalizer = false; | 17 bool warn_unneeded_finalizer = false; |
18 | 18 |
| 19 // Member<T> fields are only permitted in managed classes, |
| 20 // something CheckFieldsVisitor verifies, issuing errors if |
| 21 // found in unmanaged classes. WeakMember<T> should be treated |
| 22 // the exact same, but CheckFieldsVisitor was missing the case |
| 23 // for handling the weak member variant until crbug.com/724418. |
| 24 // |
| 25 // We've default-enabled the checking for those also now, but do |
| 26 // offer an opt-out option should enabling the check lead to |
| 27 // unexpected (but wanted, really) compilation errors while |
| 28 // rolling out an updated GC plugin version. |
| 29 // |
| 30 // TODO(sof): remove this option once safely rolled out. |
| 31 bool enable_weak_members_in_unmanaged_classes = false; |
| 32 |
19 std::set<std::string> ignored_classes; | 33 std::set<std::string> ignored_classes; |
20 std::set<std::string> checked_namespaces; | 34 std::set<std::string> checked_namespaces; |
21 std::vector<std::string> ignored_directories; | 35 std::vector<std::string> ignored_directories; |
22 }; | 36 }; |
23 | 37 |
24 #endif // TOOLS_BLINK_GC_PLUGIN_BLINK_GC_PLUGIN_OPTIONS_H_ | 38 #endif // TOOLS_BLINK_GC_PLUGIN_BLINK_GC_PLUGIN_OPTIONS_H_ |
OLD | NEW |