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

Unified Diff: third_party/WebKit/Source/BUILD.gn

Issue 2724353002: Enable Blink GC plugin check for stack allocated classes. (Closed)
Patch Set: Created 3 years, 10 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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",
+ ]
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698