Stop using dispatch_set_target_queue()
[WebKit-https.git] / Source / ThirdParty / libwebrtc / WebKit / 0009-Remove-dispatch_set_target_queue.patch
1 diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/task_queue_gcd.cc b/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/task_queue_gcd.cc
2 index a13e088ede6..675b8005722 100644
3 --- a/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/task_queue_gcd.cc
4 +++ b/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/task_queue_gcd.cc
5 @@ -139,7 +139,7 @@ class TaskQueue::Impl : public RefCountInterface {
6  TaskQueue::Impl::Impl(const char* queue_name,
7                        TaskQueue* task_queue,
8                        Priority priority)
9 -    : queue_(dispatch_queue_create(queue_name, DISPATCH_QUEUE_SERIAL)),
10 +    : queue_(dispatch_queue_create_with_target(queue_name, DISPATCH_QUEUE_SERIAL, dispatch_get_global_queue(TaskQueuePriorityToGCD(priority), 0))),
11        context_(new QueueContext(task_queue)) {
12    RTC_DCHECK(queue_name);
13    RTC_CHECK(queue_);
14 @@ -148,9 +148,6 @@ TaskQueue::Impl::Impl(const char* queue_name,
15    // to the queue is released.  This may run after the TaskQueue object has
16    // been deleted.
17    dispatch_set_finalizer_f(queue_, &QueueContext::DeleteContext);
18 -
19 -  dispatch_set_target_queue(
20 -      queue_, dispatch_get_global_queue(TaskQueuePriorityToGCD(priority), 0));
21  }
22  
23  TaskQueue::Impl::~Impl() {