Chromium Code Reviews| Index: Source/modules/webaudio/DeferredTaskHandler.cpp |
| diff --git a/Source/modules/webaudio/DeferredTaskHandler.cpp b/Source/modules/webaudio/DeferredTaskHandler.cpp |
| index e5ded30448748d06e92bb85998c3243ef5dc2d82..339e3fd9b32f5cfdaa28c5529ac7bb2733935b78 100644 |
| --- a/Source/modules/webaudio/DeferredTaskHandler.cpp |
| +++ b/Source/modules/webaudio/DeferredTaskHandler.cpp |
| @@ -41,6 +41,14 @@ void DeferredTaskHandler::lock() |
| m_contextGraphMutex.lock(); |
| } |
| +void DeferredTaskHandler::forceLock() |
| +{ |
| + // This allows the regular lock in offline audio rendering. It is okay to |
|
tkent
2015/07/16 00:33:43
Such comment should be in the header.
hongchan
2015/07/16 16:22:18
Done.
|
| + // lock the offline audio render thread because it is not real-time thread. |
| + ASSERT(!isMainThread()); |
| + m_contextGraphMutex.lock(); |
| +} |
| + |
| bool DeferredTaskHandler::tryLock() |
| { |
| // Try to catch cases of using try lock on main thread |