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

Unified Diff: webrtc/base/messagequeue.h

Issue 2131503002: Replace reentrant check to be more explicit and avoid a data race when comparing (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 5 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 | « webrtc/base/criticalsection.h ('k') | webrtc/base/messagequeue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/messagequeue.h
diff --git a/webrtc/base/messagequeue.h b/webrtc/base/messagequeue.h
index 15b98565b770e0eef60563c82e25d3ff4da03c07..a1b20da0e5194ac849b21b5a579418deff04ec1a 100644
--- a/webrtc/base/messagequeue.h
+++ b/webrtc/base/messagequeue.h
@@ -68,8 +68,11 @@ class MessageQueueManager {
static MessageQueueManager* instance_;
// This list contains all live MessageQueues.
- std::vector<MessageQueue *> message_queues_;
+ std::vector<MessageQueue*> message_queues_ GUARDED_BY(crit_);
+
+ // Acquire this with DebugNonReentrantCritScope.
CriticalSection crit_;
+ bool locked_ GUARDED_BY(crit_);
};
// Derive from this for specialized data
« no previous file with comments | « webrtc/base/criticalsection.h ('k') | webrtc/base/messagequeue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698