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

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: Fixing one more place where RTC_FROM_HERE wasn't used. Created 4 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 | « webrtc/base/task_queue.h ('k') | webrtc/base/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/thread.h
diff --git a/webrtc/base/thread.h b/webrtc/base/thread.h
index 1afe9d5ebef17aca78fb460a3d5df012a61bcaa5..97e69415cd3dba6098c022edfd7968a705c7c357 100644
--- a/webrtc/base/thread.h
+++ b/webrtc/base/thread.h
@@ -151,7 +151,8 @@ class LOCKABLE 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,15 +160,14 @@ class LOCKABLE 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>(RTC_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) {
- InvokeBegin();
+ ReturnT Invoke(const Location& posted_from, const FunctorT& functor) {
FunctorMessageHandler<ReturnT, FunctorT> handler(functor);
- Send(&handler);
- InvokeEnd();
+ InvokeInternal(posted_from, &handler);
return handler.result();
}
@@ -261,9 +261,7 @@ class LOCKABLE Thread : public MessageQueue {
// Returns true if there is such a message.
bool PopSendMessageFromThread(const Thread* source, _SendMessage* msg);
- // Used for tracking performance of Invoke calls.
- void InvokeBegin();
- void InvokeEnd();
+ void InvokeInternal(const Location& posted_from, MessageHandler* handler);
std::list<_SendMessage> sendlist_;
std::string name_;
« no previous file with comments | « webrtc/base/task_queue.h ('k') | webrtc/base/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698