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

Unified Diff: webrtc/base/trace_event.h

Issue 2716343002: Fix race in INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO (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: webrtc/base/trace_event.h
diff --git a/webrtc/base/trace_event.h b/webrtc/base/trace_event.h
index 3916af4fb61bf713139f60f617c02793b24ade3e..3789886a1ccec44be1b0e615681a1614cf198965 100644
--- a/webrtc/base/trace_event.h
+++ b/webrtc/base/trace_event.h
@@ -577,11 +577,8 @@
// 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) = 0; \
- if (!INTERNAL_TRACE_EVENT_UID(catstatic)) { \
- INTERNAL_TRACE_EVENT_UID(catstatic) = \
- TRACE_EVENT_API_GET_CATEGORY_ENABLED(category); \
- }
+ static const unsigned char* INTERNAL_TRACE_EVENT_UID(catstatic) = \
+ TRACE_EVENT_API_GET_CATEGORY_ENABLED(category);
// Implementation detail: internal macro to create static category and add
// event if the category is enabled.
« 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