Index: third_party/WebKit/Source/BUILD.gn |
diff --git a/third_party/WebKit/Source/BUILD.gn b/third_party/WebKit/Source/BUILD.gn |
index ca5d37ceb669962f2b942391e9c90c4b2f0c26aa..da63271a03bbc769c3e25761e7a554fecd371b8b 100644 |
--- a/third_party/WebKit/Source/BUILD.gn |
+++ b/third_party/WebKit/Source/BUILD.gn |
@@ -29,6 +29,13 @@ declare_args() { |
# rather than legacy Blink name. |
# TODO(https://crbug.com/675879): Remove this option after the Blink rename. |
blink_gc_plugin_option_use_chromium_style_naming = false |
+ |
+ # Set to true to have the clang Blink GC plugin additionally check if |
+ # stack only classes (i.e., STACK_ALLOCATED()-annotated) define an unused |
+ # and unwanted trace method. |
+ # TODO(https://crbug.com/689864): remove once the GC plugin has been rolled |
+ # with this check default enabled. |
+ blink_gc_plugin_option_warn_stack_allocated_trace_methods = true |
Nico
2017/03/02 14:08:56
if the plan is to remove this soon again…
|
} |
# features --------------------------------------------------------------------- |
@@ -151,6 +158,14 @@ config("config") { |
"use-chromium-style-naming", |
] |
} |
+ if (blink_gc_plugin_option_warn_stack_allocated_trace_methods) { |
Nico
2017/03/02 14:08:56
…maybe just add it unconditionally here?
sof
2017/03/02 14:28:41
Yes, selectively turning it off shouldn't be neede
|
+ cflags += [ |
+ "-Xclang", |
+ "-plugin-arg-blink-gc-plugin", |
+ "-Xclang", |
+ "warn-stack-allocated-trace-method", |
+ ] |
+ } |
} |
} |