Delete AsyncInvoker usage in DataChannelController

Tasks access this via WeakPtrFactory.

Bug: webrtc:12339
Change-Id: I0aaeffd4bed59a6abfadf995286644c24c1fd716
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212721
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33560}
This commit is contained in:
Niels Möller
2021-03-23 09:23:10 +01:00
committed by Commit Bot
parent 4c555cca2d
commit 236e36c25f
2 changed files with 59 additions and 45 deletions

View File

@ -29,7 +29,6 @@
#include "pc/data_channel_utils.h"
#include "pc/rtp_data_channel.h"
#include "pc/sctp_data_channel.h"
#include "rtc_base/async_invoker.h"
#include "rtc_base/checks.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "rtc_base/ssl_stream_adapter.h"
@ -245,6 +244,8 @@ class DataChannelController : public RtpDataChannelProviderInterface,
// Owning PeerConnection.
PeerConnection* const pc_;
// The weak pointers must be dereferenced and invalidated on the signalling
// thread only.
rtc::WeakPtrFactory<DataChannelController> weak_factory_{this};
};