Reland of Make it possible for tests to set up trace event handlers. (patchset #1 id:1 of https://codereview.webrtc.org/2997963002/ )
Reason for revert: This should fix it Original issue's description: > Revert of Make it possible for tests to set up trace event handlers. (patchset #4 id:60001 of https://codereview.webrtc.org/3002663002/ ) > > Reason for revert: > Breaks Chromium bots. > https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/27340/steps/generate_build_files/logs/stdio > > Original issue's description: > > Make it possible for tests to set up trace event handlers. > > > > As it is now, the first time a TRACE_EVENT... is called, the result from > > the current handler is stored in a static const variable, and subsequent > > calls will use that value regardless of changes to the handler. > > > > This is a problem if a test wants to use another handler. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/3002663002 > > Cr-Commit-Position: refs/heads/master@{#19382} > > Committed:a973265622> > TBR=hbos@webrtc.org,kwiberg@webrtc.org,mbonadei@webrtc.org,kjellander@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2997963002 > Cr-Commit-Position: refs/heads/master@{#19383} > Committed:db758c2589TBR=hbos@webrtc.org,kwiberg@webrtc.org,mbonadei@webrtc.org,kjellander@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=None Review-Url: https://codereview.webrtc.org/2995123002 Cr-Commit-Position: refs/heads/master@{#19386}
This commit is contained in:
parent
6b463faccb
commit
481c549b29
@ -26,8 +26,19 @@ 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 = [
|
||||
defines += [
|
||||
# TODO(kjellander): Cleanup unused ones and move defines closer to
|
||||
# the source when webrtc:4256 is completed.
|
||||
"FEATURE_ENABLE_VOICEMAIL",
|
||||
|
||||
@ -575,9 +575,15 @@
|
||||
#define INTERNAL_TRACE_EVENT_UID(name_prefix) \
|
||||
INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__)
|
||||
|
||||
#if WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS
|
||||
#define INTERNAL_TRACE_EVENT_INFO_TYPE const unsigned char*
|
||||
#else
|
||||
#define INTERNAL_TRACE_EVENT_INFO_TYPE static const unsigned char*
|
||||
#endif // WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS
|
||||
|
||||
// Implementation detail: internal macro to create static category.
|
||||
#define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category) \
|
||||
static const unsigned char* INTERNAL_TRACE_EVENT_UID(catstatic) = \
|
||||
INTERNAL_TRACE_EVENT_INFO_TYPE INTERNAL_TRACE_EVENT_UID(catstatic) = \
|
||||
TRACE_EVENT_API_GET_CATEGORY_ENABLED(category);
|
||||
|
||||
// Implementation detail: internal macro to create static category and add
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user