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

Unified Diff: webrtc/base/thread.h

Issue 2019423006: Adding more detail to MessageQueue::Dispatch logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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
Index: webrtc/base/thread.h
diff --git a/webrtc/base/thread.h b/webrtc/base/thread.h
index 1a0c447264e4284e426b80e9cfd38a3a99503cba..45531e8bb83064dc1b9ddf8fe4913498064aa2d7 100644
--- a/webrtc/base/thread.h
+++ b/webrtc/base/thread.h
@@ -151,7 +151,8 @@ class Thread : public MessageQueue {
// ProcessMessages occasionally.
virtual void Run();
- virtual void Send(MessageHandler* phandler,
+ virtual void Send(const Location& posted_from,
+ MessageHandler* phandler,
uint32_t id = 0,
MessageData* pdata = NULL);
@@ -159,14 +160,14 @@ class Thread : public MessageQueue {
// provide the |ReturnT| template argument, which cannot (easily) be deduced.
// Uses Send() internally, which blocks the current thread until execution
// is complete.
- // Ex: bool result = thread.Invoke<bool>(&MyFunctionReturningBool);
+ // Ex: bool result = thread.Invoke<bool>(FROM_HERE, &MyFunctionReturningBool);
// NOTE: This function can only be called when synchronous calls are allowed.
// See ScopedDisallowBlockingCalls for details.
template <class ReturnT, class FunctorT>
- ReturnT Invoke(const FunctorT& functor) {
+ ReturnT Invoke(const Location& posted_from, const FunctorT& functor) {
InvokeBegin();
FunctorMessageHandler<ReturnT, FunctorT> handler(functor);
- Send(&handler);
+ Send(posted_from, &handler);
InvokeEnd();
return handler.result();
}
« webrtc/base/messagequeue.cc ('K') | « webrtc/base/stream.cc ('k') | webrtc/base/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698