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

Unified Diff: webrtc/base/messagequeue.h

Issue 2023193002: Protect MessageQueue stop field with a critical section to avoid data races. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Clear suppresion is needed for vtable/destructor race 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 | « no previous file | webrtc/base/messagequeue.cc » ('j') | webrtc/base/messagequeue.cc » ('J')
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..d321cdb673e29fa5e51f962fb1173828b43d1eb9 100644
--- a/webrtc/base/messagequeue.h
+++ b/webrtc/base/messagequeue.h
@@ -285,7 +285,6 @@ class MessageQueue {
void WakeUpSocketServer();
- bool fStop_;
bool fPeekKeep_;
Message msgPeek_;
MessageList msgq_ GUARDED_BY(crit_);
@@ -296,6 +295,8 @@ class MessageQueue {
bool fDestroyed_;
private:
+ volatile int stop_;
+
// The SocketServer might not be owned by MessageQueue.
SocketServer* ss_ GUARDED_BY(ss_lock_);
// Used if SocketServer ownership lies with |this|.
« no previous file with comments | « no previous file | webrtc/base/messagequeue.cc » ('j') | webrtc/base/messagequeue.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698