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

Unified Diff: webrtc/BUILD.gn

Issue 3002663002: Make it possible for tests to set up trace event handlers. (Closed)
Patch Set: Nit. Created 3 years, 4 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 | webrtc/rtc_base/trace_event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/BUILD.gn
diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn
index 58b5f5e74004efdf86ca154e3e838d678faeeb16..ac3b02a20f3e0bd3287fdd017b6325fd010eb417 100644
--- a/webrtc/BUILD.gn
+++ b/webrtc/BUILD.gn
@@ -26,6 +26,17 @@ config("common_inherited_config") {
if (build_with_mozilla) {
defines += [ "WEBRTC_MOZILLA_BUILD" ]
}
+ # Some tests need to declare their own trace event handlers. If this define is
+ # not set, the first time TRACE_EVENT_* is called it will store the return
+ # value for the current handler in an static variable, so that subsequent
+ # changes to the handler for that TRACE_EVENT_* will be ignored.
+ # So when tests are included, we set this define, making it possible to use
+ # different event handlers in different tests.
+ if (rtc_include_tests) {
+ defines += [ "WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=1" ]
+ } else {
+ defines += [ "WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0" ]
+ }
if (build_with_chromium) {
defines = [
# TODO(kjellander): Cleanup unused ones and move defines closer to
« no previous file with comments | « no previous file | webrtc/rtc_base/trace_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698