Adding more detail to MessageQueue::Dispatch logging.

Every message will now be traced with the location from which it was
posted, including function name, file and line number.

This CL also writes a normal LOG message when the dispatch took more
than a certain amount of time (currently 50ms).

This logging should help us identify messages that are taking
longer than expected to be dispatched.

R=pthatcher@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2019423006 .

Cr-Commit-Position: refs/heads/master@{#13104}
diff --git a/webrtc/api/quicdatachannel.cc b/webrtc/api/quicdatachannel.cc
index 5420da1..f4f5732 100644
--- a/webrtc/api/quicdatachannel.cc
+++ b/webrtc/api/quicdatachannel.cc
@@ -92,7 +92,7 @@
     return false;
   }
   return worker_thread_->Invoke<bool>(
-      rtc::Bind(&QuicDataChannel::Send_w, this, buffer));
+      RTC_FROM_HERE, rtc::Bind(&QuicDataChannel::Send_w, this, buffer));
 }
 
 bool QuicDataChannel::Send_w(const DataBuffer& buffer) {
@@ -187,8 +187,9 @@
   RTC_DCHECK(worker_thread_->IsCurrent());
   buffered_amount_ = buffered_amount;
   invoker_.AsyncInvoke<void>(
-      signaling_thread_, rtc::Bind(&QuicDataChannel::OnBufferedAmountChange_s,
-                                   this, buffered_amount));
+      RTC_FROM_HERE, signaling_thread_,
+      rtc::Bind(&QuicDataChannel::OnBufferedAmountChange_s, this,
+                buffered_amount));
 }
 
 void QuicDataChannel::Close() {
@@ -198,7 +199,8 @@
   }
   LOG(LS_INFO) << "Closing QUIC data channel.";
   SetState_s(kClosing);
-  worker_thread_->Invoke<void>(rtc::Bind(&QuicDataChannel::Close_w, this));
+  worker_thread_->Invoke<void>(RTC_FROM_HERE,
+                               rtc::Bind(&QuicDataChannel::Close_w, this));
   SetState_s(kClosed);
 }
 
@@ -236,7 +238,7 @@
   quic_transport_channel_ = channel;
   LOG(LS_INFO) << "Setting QuicTransportChannel for QUIC data channel " << id_;
   DataState data_channel_state = worker_thread_->Invoke<DataState>(
-      rtc::Bind(&QuicDataChannel::SetTransportChannel_w, this));
+      RTC_FROM_HERE, rtc::Bind(&QuicDataChannel::SetTransportChannel_w, this));
   SetState_s(data_channel_state);
   return true;
 }
@@ -269,7 +271,7 @@
                  << " has finished receiving data for QUIC data channel "
                  << id_;
     DataBuffer final_message(message.buffer, false);
-    invoker_.AsyncInvoke<void>(signaling_thread_,
+    invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_,
                                rtc::Bind(&QuicDataChannel::OnMessage_s, this,
                                          std::move(final_message)));
     message.stream->Close();
@@ -316,7 +318,7 @@
   received_data.AppendData(data, len);
   DataBuffer final_message(std::move(received_data), false);
   invoker_.AsyncInvoke<void>(
-      signaling_thread_,
+      RTC_FROM_HERE, signaling_thread_,
       rtc::Bind(&QuicDataChannel::OnMessage_s, this, std::move(final_message)));
   // Once the stream is closed, OnDataReceived will not fire for the stream.
   stream->Close();
@@ -327,7 +329,8 @@
   RTC_DCHECK(channel == quic_transport_channel_);
   LOG(LS_INFO) << "QuicTransportChannel is ready to send";
   invoker_.AsyncInvoke<void>(
-      signaling_thread_, rtc::Bind(&QuicDataChannel::SetState_s, this, kOpen));
+      RTC_FROM_HERE, signaling_thread_,
+      rtc::Bind(&QuicDataChannel::SetState_s, this, kOpen));
 }
 
 void QuicDataChannel::OnWriteBlockedStreamClosed(net::QuicStreamId stream_id,
@@ -346,7 +349,7 @@
 
 void QuicDataChannel::OnConnectionClosed() {
   RTC_DCHECK(worker_thread_->IsCurrent());
-  invoker_.AsyncInvoke<void>(signaling_thread_,
+  invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_,
                              rtc::Bind(&QuicDataChannel::Close, this));
 }