From bc4b93453c4935ee0857f80e82c437c6722df951 Mon Sep 17 00:00:00 2001 From: Tommi Date: Thu, 2 Apr 2015 18:34:37 +0000 Subject: [PATCH] Add a DCHECK to RegisterModule to make sure it's called on the controller thread. BUG=4508 TBR=perkj Review URL: https://webrtc-codereview.appspot.com/43039004 Cr-Commit-Position: refs/heads/master@{#8925} --- webrtc/modules/utility/source/process_thread_impl.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webrtc/modules/utility/source/process_thread_impl.cc b/webrtc/modules/utility/source/process_thread_impl.cc index ca319ad486..4ce1675030 100644 --- a/webrtc/modules/utility/source/process_thread_impl.cc +++ b/webrtc/modules/utility/source/process_thread_impl.cc @@ -130,8 +130,7 @@ void ProcessThreadImpl::PostTask(rtc::scoped_ptr task) { } void ProcessThreadImpl::RegisterModule(Module* module) { - // Allowed to be called on any thread. - // TODO(tommi): Disallow this ^^^ + DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(module); #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))