From 1fd362c31ee66283433b60fb5b85f548e8599982 Mon Sep 17 00:00:00 2001 From: "jiayl@webrtc.org" Date: Fri, 26 Sep 2014 16:57:07 +0000 Subject: [PATCH] Do not assert for blocking call allowed in Thread::Join. We do not allow blocking call from the worker thread, but on Android the worker thread may stop/join a SignalThread, which hits the assert. AssertBlockingIsAllowedOnCurrentThread is used to make sure a thread does not do Invoke, so check that in Thread::Join does not seem to add much value. BUG=3857 R=juberti@webrtc.org Review URL: https://webrtc-codereview.appspot.com/24709004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7308 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/base/thread.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webrtc/base/thread.cc b/webrtc/base/thread.cc index 40257ab88c..aa2442f371 100644 --- a/webrtc/base/thread.cc +++ b/webrtc/base/thread.cc @@ -312,10 +312,13 @@ void Thread::SafeWrapCurrent() { } void Thread::Join() { - AssertBlockingIsAllowedOnCurrentThread(); - if (running()) { ASSERT(!IsCurrent()); + if (Current() && !Current()->blocking_calls_allowed_) { + LOG(LS_WARNING) << "Waiting for the thread to join, " + << "but blocking calls have been disallowed"; + } + #if defined(WEBRTC_WIN) ASSERT(thread_ != NULL); WaitForSingleObject(thread_, INFINITE);