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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void DeferredTaskHandler::offlineLock() { 58 void DeferredTaskHandler::offlineLock() {
59 // CHECK is here to make sure to explicitly crash if this is called from 59 // CHECK is here to make sure to explicitly crash if this is called from
60 // other than the offline render thread, which is considered as the audio 60 // other than the offline render thread, which is considered as the audio
61 // thread in OfflineAudioContext. 61 // thread in OfflineAudioContext.
62 CHECK(isAudioThread()) << "DeferredTaskHandler::offlineLock() must be called " 62 CHECK(isAudioThread()) << "DeferredTaskHandler::offlineLock() must be called "
63 "within the offline audio thread."; 63 "within the offline audio thread.";
64 64
65 m_contextGraphMutex.lock(); 65 m_contextGraphMutex.lock();
66 } 66 }
67 67
68 #if ENABLE(ASSERT) 68 #if DCHECK_IS_ON()
69 bool DeferredTaskHandler::isGraphOwner() { 69 bool DeferredTaskHandler::isGraphOwner() {
70 return m_contextGraphMutex.locked(); 70 return m_contextGraphMutex.locked();
71 } 71 }
72 #endif 72 #endif
73 73
74 void DeferredTaskHandler::addDeferredBreakConnection(AudioHandler& node) { 74 void DeferredTaskHandler::addDeferredBreakConnection(AudioHandler& node) {
75 DCHECK(isAudioThread()); 75 DCHECK(isAudioThread());
76 m_deferredBreakConnectionList.push_back(&node); 76 m_deferredBreakConnectionList.push_back(&node);
77 } 77 }
78 78
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 m_deletableOrphanHandlers.clear(); 281 m_deletableOrphanHandlers.clear();
282 } 282 }
283 283
284 void DeferredTaskHandler::setAudioThreadToCurrentThread() { 284 void DeferredTaskHandler::setAudioThreadToCurrentThread() {
285 DCHECK(!isMainThread()); 285 DCHECK(!isMainThread());
286 ThreadIdentifier thread = currentThread(); 286 ThreadIdentifier thread = currentThread();
287 releaseStore(&m_audioThread, thread); 287 releaseStore(&m_audioThread, thread);
288 } 288 }
289 289
290 } // namespace blink 290 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698