BlinkGCPluginOptions.h 1.3 KB

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