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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: m_domTreeVersion initialization 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 266 }
267 // 267 //
268 // Thread Safety and Graph Locking: 268 // Thread Safety and Graph Locking:
269 // 269 //
270 // The following functions call corresponding functions of 270 // The following functions call corresponding functions of
271 // DeferredTaskHandler. 271 // DeferredTaskHandler.
272 bool isAudioThread() const { return deferredTaskHandler().isAudioThread(); } 272 bool isAudioThread() const { return deferredTaskHandler().isAudioThread(); }
273 void lock() { deferredTaskHandler().lock(); } 273 void lock() { deferredTaskHandler().lock(); }
274 bool tryLock() { return deferredTaskHandler().tryLock(); } 274 bool tryLock() { return deferredTaskHandler().tryLock(); }
275 void unlock() { deferredTaskHandler().unlock(); } 275 void unlock() { deferredTaskHandler().unlock(); }
276 #if ENABLE(ASSERT) 276 #if DCHECK_IS_ON()
277 // Returns true if this thread owns the context's lock. 277 // Returns true if this thread owns the context's lock.
278 bool isGraphOwner() { return deferredTaskHandler().isGraphOwner(); } 278 bool isGraphOwner() { return deferredTaskHandler().isGraphOwner(); }
279 #endif 279 #endif
280 using AutoLocker = DeferredTaskHandler::AutoLocker; 280 using AutoLocker = DeferredTaskHandler::AutoLocker;
281 281
282 // Returns the maximum numuber of channels we can support. 282 // Returns the maximum numuber of channels we can support.
283 static unsigned maxNumberOfChannels() { return MaxNumberOfChannels; } 283 static unsigned maxNumberOfChannels() { return MaxNumberOfChannels; }
284 284
285 // EventTarget 285 // EventTarget
286 const AtomicString& interfaceName() const final; 286 const AtomicString& interfaceName() const final;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // It is somewhat arbitrary and could be increased if necessary. 456 // It is somewhat arbitrary and could be increased if necessary.
457 enum { MaxNumberOfChannels = 32 }; 457 enum { MaxNumberOfChannels = 32 };
458 458
459 Optional<AutoplayStatus> m_autoplayStatus; 459 Optional<AutoplayStatus> m_autoplayStatus;
460 AudioIOPosition m_outputPosition; 460 AudioIOPosition m_outputPosition;
461 }; 461 };
462 462
463 } // namespace blink 463 } // namespace blink
464 464
465 #endif // BaseAudioContext_h 465 #endif // BaseAudioContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698