Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| 55 return m_contextGraphMutex.tryLock(); | 55 return m_contextGraphMutex.tryLock(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void DeferredTaskHandler::unlock() | 58 void DeferredTaskHandler::unlock() |
| 59 { | 59 { |
| 60 m_contextGraphMutex.unlock(); | 60 m_contextGraphMutex.unlock(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void DeferredTaskHandler::offlineLock() | |
| 64 { | |
| 65 // It is safe to lock the audio thread for offline rendering. | |
| 66 ASSERT(isAudioThread()); | |
|
Raymond Toy
2015/10/16 23:32:36
What should we do in a release build if we acciden
hongchan
2015/10/19 20:08:12
This is why I completely separated the render meth
Raymond Toy
2015/10/19 20:27:27
Maybe RELEASE_ASSERT or RELEASE_ASSERT_WITH_MESSAG
hongchan
2015/10/20 22:03:06
Done.
| |
| 67 m_contextGraphMutex.lock(); | |
| 68 } | |
| 69 | |
| 63 #if ENABLE(ASSERT) | 70 #if ENABLE(ASSERT) |
| 64 bool DeferredTaskHandler::isGraphOwner() | 71 bool DeferredTaskHandler::isGraphOwner() |
| 65 { | 72 { |
| 66 return m_contextGraphMutex.locked(); | 73 return m_contextGraphMutex.locked(); |
| 67 } | 74 } |
| 68 #endif | 75 #endif |
| 69 | 76 |
| 70 void DeferredTaskHandler::addDeferredBreakConnection(AudioHandler& node) | 77 void DeferredTaskHandler::addDeferredBreakConnection(AudioHandler& node) |
| 71 { | 78 { |
| 72 ASSERT(isAudioThread()); | 79 ASSERT(isAudioThread()); |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 { | 268 { |
| 262 ASSERT(isMainThread()); | 269 ASSERT(isMainThread()); |
| 263 AutoLocker locker(*this); | 270 AutoLocker locker(*this); |
| 264 m_renderingOrphanHandlers.clear(); | 271 m_renderingOrphanHandlers.clear(); |
| 265 m_deletableOrphanHandlers.clear(); | 272 m_deletableOrphanHandlers.clear(); |
| 266 } | 273 } |
| 267 | 274 |
| 268 } // namespace blink | 275 } // namespace blink |
| 269 | 276 |
| 270 #endif // ENABLE(WEB_AUDIO) | 277 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |