Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: webrtc/base/platform_thread.cc

Issue 2753423002: Add a missing DCHECK to PlatformThread::SetPriority. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 #endif 272 #endif
273 } while (!AtomicOps::AcquireLoad(&stop_flag_)); 273 } while (!AtomicOps::AcquireLoad(&stop_flag_));
274 #endif // defined(WEBRTC_WIN) 274 #endif // defined(WEBRTC_WIN)
275 } 275 }
276 276
277 bool PlatformThread::SetPriority(ThreadPriority priority) { 277 bool PlatformThread::SetPriority(ThreadPriority priority) {
278 #if RTC_DCHECK_IS_ON 278 #if RTC_DCHECK_IS_ON
279 if (run_function_) { 279 if (run_function_) {
280 // The non-deprecated way of how this function gets called, is that it must 280 // The non-deprecated way of how this function gets called, is that it must
281 // be called on the worker thread itself. 281 // be called on the worker thread itself.
282 RTC_DCHECK(!thread_checker_.CalledOnValidThread());
282 RTC_DCHECK(spawned_thread_checker_.CalledOnValidThread()); 283 RTC_DCHECK(spawned_thread_checker_.CalledOnValidThread());
283 } else { 284 } else {
284 // In the case of deprecated use of this method, it must be called on the 285 // In the case of deprecated use of this method, it must be called on the
285 // same thread as the PlatformThread object is constructed on. 286 // same thread as the PlatformThread object is constructed on.
286 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 287 RTC_DCHECK(thread_checker_.CalledOnValidThread());
287 RTC_DCHECK(IsRunning()); 288 RTC_DCHECK(IsRunning());
288 } 289 }
289 #endif 290 #endif
290 291
291 #if defined(WEBRTC_WIN) 292 #if defined(WEBRTC_WIN)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 #if defined(WEBRTC_WIN) 343 #if defined(WEBRTC_WIN)
343 bool PlatformThread::QueueAPC(PAPCFUNC function, ULONG_PTR data) { 344 bool PlatformThread::QueueAPC(PAPCFUNC function, ULONG_PTR data) {
344 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 345 RTC_DCHECK(thread_checker_.CalledOnValidThread());
345 RTC_DCHECK(IsRunning()); 346 RTC_DCHECK(IsRunning());
346 347
347 return QueueUserAPC(function, thread_, data) != FALSE; 348 return QueueUserAPC(function, thread_, data) != FALSE;
348 } 349 }
349 #endif 350 #endif
350 351
351 } // namespace rtc 352 } // namespace rtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698