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

Unified Diff: webrtc/base/asyncinvoker-inl.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/asyncinvoker.cc ('k') | webrtc/base/autodetectproxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/asyncinvoker-inl.h
diff --git a/webrtc/base/asyncinvoker-inl.h b/webrtc/base/asyncinvoker-inl.h
index f615f83fdbf382d5c69a28cf8a4e2ee63a235e74..15fafa888b1fca715f28bb8b4161432f82f9e538 100644
--- a/webrtc/base/asyncinvoker-inl.h
+++ b/webrtc/base/asyncinvoker-inl.h
@@ -58,7 +58,9 @@ class NotifyingAsyncClosureBase : public AsyncClosure,
~NotifyingAsyncClosureBase() override;
protected:
- NotifyingAsyncClosureBase(AsyncInvoker* invoker, Thread* calling_thread);
+ NotifyingAsyncClosureBase(AsyncInvoker* invoker,
+ const Location& callback_posted_from,
+ Thread* calling_thread);
void TriggerCallback();
void SetCallback(const Callback0<void>& callback) {
CritScope cs(&crit_);
@@ -67,9 +69,10 @@ class NotifyingAsyncClosureBase : public AsyncClosure,
bool CallbackCanceled() const { return calling_thread_ == NULL; }
private:
+ AsyncInvoker* invoker_;
+ Location callback_posted_from_;
Callback0<void> callback_;
CriticalSection crit_;
- AsyncInvoker* invoker_;
Thread* calling_thread_;
void CancelCallback();
@@ -80,14 +83,17 @@ template <class ReturnT, class FunctorT, class HostT>
class NotifyingAsyncClosure : public NotifyingAsyncClosureBase {
public:
NotifyingAsyncClosure(AsyncInvoker* invoker,
+ const Location& callback_posted_from,
Thread* calling_thread,
const FunctorT& functor,
void (HostT::*callback)(ReturnT),
HostT* callback_host)
- : NotifyingAsyncClosureBase(invoker, calling_thread),
- functor_(functor),
- callback_(callback),
- callback_host_(callback_host) {}
+ : NotifyingAsyncClosureBase(invoker,
+ callback_posted_from,
+ calling_thread),
+ functor_(functor),
+ callback_(callback),
+ callback_host_(callback_host) {}
virtual void Execute() {
ReturnT result = functor_();
if (!CallbackCanceled()) {
@@ -108,11 +114,14 @@ class NotifyingAsyncClosure<void, FunctorT, HostT>
: public NotifyingAsyncClosureBase {
public:
NotifyingAsyncClosure(AsyncInvoker* invoker,
+ const Location& callback_posted_from,
Thread* calling_thread,
const FunctorT& functor,
void (HostT::*callback)(),
HostT* callback_host)
- : NotifyingAsyncClosureBase(invoker, calling_thread),
+ : NotifyingAsyncClosureBase(invoker,
+ callback_posted_from,
+ calling_thread),
functor_(functor) {
SetCallback(Callback0<void>(Bind(callback, callback_host)));
}
« no previous file with comments | « webrtc/base/asyncinvoker.cc ('k') | webrtc/base/autodetectproxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698