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

Unified Diff: webrtc/modules/utility/source/process_thread_impl.cc

Issue 2967693002: Add RTC_FROM_HERE location information to two DCHECKs in ProcessThread. (Closed)
Patch Set: Created 3 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/utility/source/process_thread_impl.cc
diff --git a/webrtc/modules/utility/source/process_thread_impl.cc b/webrtc/modules/utility/source/process_thread_impl.cc
index f59a451bdeb3f4a1090fc8d8f58c1d735af6b450..069b0c7c67dc6683f85731b7af3589b40e772b67 100644
--- a/webrtc/modules/utility/source/process_thread_impl.cc
+++ b/webrtc/modules/utility/source/process_thread_impl.cc
@@ -118,14 +118,17 @@ void ProcessThreadImpl::PostTask(std::unique_ptr<rtc::QueuedTask> task) {
void ProcessThreadImpl::RegisterModule(Module* module,
const rtc::Location& from) {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
- RTC_DCHECK(module);
+ RTC_DCHECK(module) << from.ToString();
#if RTC_DCHECK_IS_ON
{
// Catch programmer error.
rtc::CritScope lock(&lock_);
- for (const ModuleCallback& mc : modules_)
- RTC_DCHECK(mc.module != module);
+ for (const ModuleCallback& mc : modules_) {
+ RTC_DCHECK(mc.module != module)
+ << "Already registered here: " << mc.location.ToString() << "\n"
+ << "Now attempting from here: " << from.ToString();
+ }
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698