Make ReceiveSendsFromThread use Dispatch

The ReceiveSendsFromThread function calls the OnMessage function.
However, instead we should be calling the Dispatch function which does the same thing as the OnMessage function except that it also does additional logging.
This logging is being missed for the cases where we call functions on a thread using the Invoke function.
Calling Dispatch fixes the issue and makes sure that this code path is consistent with other paths of posting to a thread like Post function which goes through Dispatch ultimately.

Bug: None
Change-Id: I75a5c8b464226cf4de60a3d19dff48f9e6197cca
Reviewed-on: https://webrtc-review.googlesource.com/85885
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23813}
This commit is contained in:
Ishan Khot
2018-06-26 20:04:43 -07:00
committed by Commit Bot
parent 91fc422d08
commit a3b6601c9b

View File

@ -422,7 +422,7 @@ void Thread::ReceiveSendsFromThread(const Thread* source) {
while (PopSendMessageFromThread(source, &smsg)) {
crit_.Leave();
smsg.msg.phandler->OnMessage(&smsg.msg);
Dispatch(&smsg.msg);
crit_.Enter();
*smsg.ready = true;