diff options
Diffstat (limited to 'pc/connection_context.cc')
-rw-r--r-- | pc/connection_context.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pc/connection_context.cc b/pc/connection_context.cc index 2904714c87..1bb7908f5c 100644 --- a/pc/connection_context.cc +++ b/pc/connection_context.cc @@ -17,7 +17,6 @@ #include "api/transport/field_trial_based_config.h" #include "media/sctp/sctp_transport_factory.h" #include "rtc_base/helpers.h" -#include "rtc_base/ref_counted_object.h" #include "rtc_base/task_utils/to_queued_task.h" #include "rtc_base/time_utils.h" @@ -76,7 +75,7 @@ std::unique_ptr<SctpTransportFactoryInterface> MaybeCreateSctpFactory( // Static rtc::scoped_refptr<ConnectionContext> ConnectionContext::Create( PeerConnectionFactoryDependencies* dependencies) { - return new rtc::RefCountedObject<ConnectionContext>(dependencies); + return new ConnectionContext(dependencies); } ConnectionContext::ConnectionContext( @@ -104,11 +103,13 @@ ConnectionContext::ConnectionContext( signaling_thread_->AllowInvokesToThread(network_thread_); worker_thread_->AllowInvokesToThread(network_thread_); if (network_thread_->IsCurrent()) { - network_thread_->DisallowAllInvokes(); + // TODO(https://crbug.com/webrtc/12802) switch to DisallowAllInvokes + network_thread_->AllowInvokesToThread(network_thread_); } else { network_thread_->PostTask(ToQueuedTask([thread = network_thread_] { thread->DisallowBlockingCalls(); - thread->DisallowAllInvokes(); + // TODO(https://crbug.com/webrtc/12802) switch to DisallowAllInvokes + thread->AllowInvokesToThread(thread); })); } |