Commit graph

6 commits

Author SHA1 Message Date
Tommi
6cea2b0f4b Remove thread checker in thread.cc due to downstream issue.
TBR=ossu@webrtc.org

Bug: webrtc:8596
Change-Id: Ie36b18a2a66e08d8006e85c3a7783df74e157c92
Reviewed-on: https://webrtc-review.googlesource.com/29204
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21049}
2017-12-04 18:34:09 +00:00
Tommi
5149242d06 Remove dependency on rtc::Event from rtc::Thread.
The problem with using an Event for the 'running_' flag is that a Wait() is necessary to check the value of the flag and calling Wait() means a synchronous system call. In chromium that can furthermore trigger checks on threads where IO/blocking operations aren't allowed.

Luckily, we don't really need this variable. Instead, I'm adding thread checks to make sure that the Thread class is used correctly and ensure that locking isn't needed for modifying state (no locks are there now). As long as we follow those rules, we only need to check if a thread_ variable has been set when we want to know if the thread is running or not.

Along the way, fixed some places where variables weren't being set or reset correctly.

Bug: webrtc:8596
Change-Id: I1467542416bc2ffbfefe276c460e76078a759bd9
Reviewed-on: https://webrtc-review.googlesource.com/27720
Reviewed-by: Henrik Grunell <henrikg@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21042}
2017-12-04 15:15:08 +00:00
Tommi
2d8c3f01ac Remove unused methods from rtc::Thread.
These methods are platform specific and give access to member variables
from an unknown thread context (no thread check, no lock).
Since these methods aren't being used, it simplifies a minor refactoring project to simply delete them.

TBR=brandtr@webrtc.org

Bug: webrtc:8596
Change-Id: I85424820d171805dcc3d74317f0e51965402052a
Reviewed-on: https://webrtc-review.googlesource.com/28281
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20983}
2017-12-01 18:54:37 +00:00
Karl Wiberg
d6b4819e4a PeerConnection::StartRtcEventLog: Improve callback memory safety
By having a unique_ptr own the callback data instead of a raw pointer,
the compiler helps us ensure that it's destroyed exactly once,
and never used after being destroyed.

(This made the callback object move-only, so I had to add support
for move-only callbacks to rtc::Thread::Invoke().)

BUG=webrtc:8111

Change-Id: Ia0804e4662e63e91e5cee18ecc3f38d2cfe8a26b
Reviewed-on: https://webrtc-review.googlesource.com/10812
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20317}
2017-10-16 21:37:14 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/rtc_base/thread.h (Browse further)