Moves logic of default SocketServer from MessageQueue to SocketServer
Review-Url: https://codereview.webrtc.org/1891293002
Cr-Commit-Position: refs/heads/master@{#12541}
This propagated into various other places. Also had to #include headers that
were implicitly pulled by "scoped_ptr.h".
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1920043002
Cr-Commit-Position: refs/heads/master@{#12501}
The CL prevents a data race in MessageQueue where the variable "ss_" is
modified without a lock while sometimes read inside a lock.
Also thread annotations have been added to the MessageQueue class.
This was already reviewed and landed in https://codereview.webrtc.org/1675923002/
but failed in Chromium GN builds due to sharedexclusivelock.cc not being
compiled in these builds. This changed in https://codereview.webrtc.org/1712773003/
so the reland should work fine now.
BUG=webrtc:5496
Review URL: https://codereview.webrtc.org/1729893002
Cr-Commit-Position: refs/heads/master@{#11758}
Reason for revert:
Broke chromium.webrtc.fyi bots:
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/9891https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20GN/builds/11416
Fails with
-----
Undefined symbols for architecture x86_64:
"rtc::SharedExclusiveLock::LockShared()", referenced from:
rtc::MessageQueue::DoDestroy() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::socketserver() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::WakeUpSocketServer() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Quit() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Get(rtc::Message*, int, bool) in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Post(rtc::MessageHandler*, unsigned int, rtc::MessageData*, bool) in librtc_base.a(messagequeue.o)
rtc::MessageQueue::DoDelayPost(int, unsigned int, rtc::MessageHandler*, unsigned int, rtc::MessageData*) in librtc_base.a(messagequeue.o)
...
"rtc::SharedExclusiveLock::UnlockShared()", referenced from:
rtc::MessageQueue::DoDestroy() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::socketserver() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::WakeUpSocketServer() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Quit() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Get(rtc::Message*, int, bool) in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Post(rtc::MessageHandler*, unsigned int, rtc::MessageData*, bool) in librtc_base.a(messagequeue.o)
rtc::MessageQueue::DoDelayPost(int, unsigned int, rtc::MessageHandler*, unsigned int, rtc::MessageData*) in librtc_base.a(messagequeue.o)
...
"rtc::SharedExclusiveLock::SharedExclusiveLock()", referenced from:
rtc::MessageQueue::MessageQueue(rtc::SocketServer*, bool) in librtc_base.a(messagequeue.o)
ld: symbol(s) not found for architecture x86_64
-----
Looks like these are compiling without "webrtc/base/sharedexclusivelock.cc".
Original issue's description:
> Prevent data race in MessageQueue.
>
> The CL prevents a data race in MessageQueue where the variable "ss_" is
> modified without a lock while sometimes read inside a lock.
>
> Also thread annotations have been added to the MessageQueue class.
>
> BUG=webrtc:5496
>
> Committed: https://crrev.com/df88460372e7ce78c871a87774d7e6d82aac6ee3
> Cr-Commit-Position: refs/heads/master@{#11683}
TBR=ivoc@webrtc.org,pthatcher@webrtc.org,deadbeef@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5496
Review URL: https://codereview.webrtc.org/1714463003
Cr-Commit-Position: refs/heads/master@{#11686}
The CL prevents a data race in MessageQueue where the variable "ss_" is
modified without a lock while sometimes read inside a lock.
Also thread annotations have been added to the MessageQueue class.
BUG=webrtc:5496
Review URL: https://codereview.webrtc.org/1675923002
Cr-Commit-Position: refs/heads/master@{#11683}
This CL fixes a race where for Thread objects the parent MessageQueue
constructor registers the object in the MessageQueueManager even though
the Thread is not constructed completely yet. Same happens during
destruction.
BUG=webrtc:1225
Review URL: https://codereview.webrtc.org/1666863002
Cr-Commit-Position: refs/heads/master@{#11497}
We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.
* DISALLOW_ASSIGN -> RTC_DISALLOW_ASSIGN
* DISALLOW_COPY_AND_ASSIGN -> RTC_DISALLOW_COPY_AND_ASSIGN
* DISALLOW_IMPLICIT_CONSTRUCTORS -> RTC_DISALLOW_IMPLICIT_CONSTRUCTORS
Related CL: https://codereview.webrtc.org/1335923002/
BUG=chromium:468375
NOTRY=true
Review URL: https://codereview.webrtc.org/1345433002
Cr-Commit-Position: refs/heads/master@{#9953}
Mostly this consists of marking functions with override when
applicable, and moving function bodies from .h to .cc files.
Not inlining virtual functions with simple bodies such as
{ return false; }
strikes me as probably losing more in readability than we gain in
binary size and compilation time, but I guess it's just like any other
case where enabling a generally good warning forces us to write
slightly worse code in a couple of places.
BUG=163
R=kjellander@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47429004
Cr-Commit-Position: refs/heads/master@{#8656}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8656 4adac7df-926f-26a2-2b94-8c16560cd09d