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

Unified Diff: webrtc/base/thread.cc

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/thread.h ('k') | webrtc/base/thread_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/thread.cc
diff --git a/webrtc/base/thread.cc b/webrtc/base/thread.cc
index c6dc3c45a03c9a37bd183ae3e82df01fd55c9369..5278c9321eae369167fb5717d5be84c6caa16021 100644
--- a/webrtc/base/thread.cc
+++ b/webrtc/base/thread.cc
@@ -26,14 +26,13 @@
#include "webrtc/base/platform_thread.h"
#include "webrtc/base/stringutils.h"
#include "webrtc/base/timeutils.h"
+#include "webrtc/base/trace_event.h"
#if !__has_feature(objc_arc) && (defined(WEBRTC_MAC))
#include "webrtc/base/maccocoathreadhelper.h"
#include "webrtc/base/scoped_autorelease_pool.h"
#endif
-#include "webrtc/base/trace_event.h"
-
namespace rtc {
ThreadManager* ThreadManager::Instance() {
@@ -343,7 +342,10 @@ void Thread::Stop() {
Join();
}
-void Thread::Send(MessageHandler* phandler, uint32_t id, MessageData* pdata) {
+void Thread::Send(const Location& posted_from,
+ MessageHandler* phandler,
+ uint32_t id,
+ MessageData* pdata) {
if (fStop_)
return;
@@ -351,6 +353,7 @@ void Thread::Send(MessageHandler* phandler, uint32_t id, MessageData* pdata) {
// of "thread", like Win32 SendMessage. If in the right context,
// call the handler directly.
Message msg;
+ msg.posted_from = posted_from;
msg.phandler = phandler;
msg.message_id = id;
msg.pdata = pdata;
@@ -444,12 +447,12 @@ bool Thread::PopSendMessageFromThread(const Thread* source, _SendMessage* msg) {
return false;
}
-void Thread::InvokeBegin() {
- TRACE_EVENT_BEGIN0("webrtc", "Thread::Invoke");
-}
-
-void Thread::InvokeEnd() {
- TRACE_EVENT_END0("webrtc", "Thread::Invoke");
+void Thread::InvokeInternal(const Location& posted_from,
+ MessageHandler* handler) {
+ TRACE_EVENT2("webrtc", "Thread::Invoke", "src_file_and_line",
+ posted_from.file_and_line(), "src_func",
+ posted_from.function_name());
+ Send(posted_from, handler);
}
void Thread::Clear(MessageHandler* phandler,
« no previous file with comments | « webrtc/base/thread.h ('k') | webrtc/base/thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698