Remove use of AsyncInvoker from SctpDataChannel
Bug: webrtc:11908 Change-Id: I4a32d9c3903d56994f2be365ab3fee2599ed6cdb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184604 Reviewed-by: Markus Handell <handellm@webrtc.org> Commit-Queue: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32145}
This commit is contained in:
committed by
Commit Bot
parent
f288f5b2d4
commit
b774d38d31
@ -274,6 +274,7 @@ rtc_library("peerconnection") {
|
||||
"../rtc_base/synchronization:sequence_checker",
|
||||
"../rtc_base/system:file_wrapper",
|
||||
"../rtc_base/system:rtc_export",
|
||||
"../rtc_base/task_utils:to_queued_task",
|
||||
"../rtc_base/third_party/base64",
|
||||
"../rtc_base/third_party/sigslot",
|
||||
"../stats",
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
#include "rtc_base/location.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ref_counted_object.h"
|
||||
#include "rtc_base/task_utils/to_queued_task.h"
|
||||
#include "rtc_base/thread.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -206,8 +207,14 @@ bool SctpDataChannel::Init() {
|
||||
// Chrome glue and WebKit) are not wired up properly until after this
|
||||
// function returns.
|
||||
if (provider_->ReadyToSendData()) {
|
||||
invoker_.AsyncInvoke<void>(RTC_FROM_HERE, rtc::Thread::Current(),
|
||||
[this] { OnTransportReady(true); });
|
||||
AddRef();
|
||||
rtc::Thread::Current()->PostTask(ToQueuedTask(
|
||||
[this] {
|
||||
RTC_DCHECK_RUN_ON(signaling_thread_);
|
||||
if (state_ != kClosed)
|
||||
OnTransportReady(true);
|
||||
},
|
||||
[this] { Release(); }));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -21,7 +21,6 @@
|
||||
#include "api/transport/data_channel_transport_interface.h"
|
||||
#include "media/base/media_channel.h"
|
||||
#include "pc/data_channel_utils.h"
|
||||
#include "rtc_base/async_invoker.h"
|
||||
#include "rtc_base/ssl_stream_adapter.h" // For SSLRole
|
||||
#include "rtc_base/third_party/sigslot/sigslot.h"
|
||||
|
||||
@ -277,7 +276,6 @@ class SctpDataChannel : public DataChannelInterface,
|
||||
PacketQueue queued_control_data_ RTC_GUARDED_BY(signaling_thread_);
|
||||
PacketQueue queued_received_data_ RTC_GUARDED_BY(signaling_thread_);
|
||||
PacketQueue queued_send_data_ RTC_GUARDED_BY(signaling_thread_);
|
||||
rtc::AsyncInvoker invoker_ RTC_GUARDED_BY(signaling_thread_);
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user