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

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

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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 void lock(); 123 void lock();
124 bool tryLock(); 124 bool tryLock();
125 void unlock(); 125 void unlock();
126 126
127 // This locks the audio render thread for OfflineAudioContext rendering. 127 // This locks the audio render thread for OfflineAudioContext rendering.
128 // MUST NOT be used in the real-time audio context. 128 // MUST NOT be used in the real-time audio context.
129 void offlineLock(); 129 void offlineLock();
130 130
131 #if ENABLE(ASSERT) 131 #if DCHECK_IS_ON()
132 // Returns true if this thread owns the context's lock. 132 // Returns true if this thread owns the context's lock.
133 bool isGraphOwner(); 133 bool isGraphOwner();
134 #endif 134 #endif
135 135
136 class MODULES_EXPORT AutoLocker { 136 class MODULES_EXPORT AutoLocker {
137 STACK_ALLOCATED(); 137 STACK_ALLOCATED();
138 138
139 public: 139 public:
140 explicit AutoLocker(DeferredTaskHandler& handler) : m_handler(handler) { 140 explicit AutoLocker(DeferredTaskHandler& handler) : m_handler(handler) {
141 m_handler.lock(); 141 m_handler.lock();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 Vector<RefPtr<AudioHandler>> m_deletableOrphanHandlers; 202 Vector<RefPtr<AudioHandler>> m_deletableOrphanHandlers;
203 203
204 // Graph locking. 204 // Graph locking.
205 RecursiveMutex m_contextGraphMutex; 205 RecursiveMutex m_contextGraphMutex;
206 volatile ThreadIdentifier m_audioThread; 206 volatile ThreadIdentifier m_audioThread;
207 }; 207 };
208 208
209 } // namespace blink 209 } // namespace blink
210 210
211 #endif // DeferredTaskHandler_h 211 #endif // DeferredTaskHandler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698