Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp |
| index cba5a99247ab2929a07aae6107dbb4a70cfee023..bf47d8939c96665a49fa4877377e57e79906f34b 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp |
| @@ -60,6 +60,16 @@ void DeferredTaskHandler::unlock() |
| m_contextGraphMutex.unlock(); |
| } |
| +void DeferredTaskHandler::offlineLock() |
| +{ |
| + // It is safe to lock the audio thread for offline rendering, but |
| + // let us have RELEASE_ASSERT here to make sure to explicitly crash rather |
| + // than accidentally blocking the audio thread. |
| + RELEASE_ASSERT(isAudioThread()); |
|
Raymond Toy
2015/10/21 18:22:45
Maybe use RELEASE_ASSERT_WITH_MESSAGE so a simple
hongchan
2015/10/22 18:23:48
Done.
|
| + |
| + m_contextGraphMutex.lock(); |
| +} |
| + |
| #if ENABLE(ASSERT) |
| bool DeferredTaskHandler::isGraphOwner() |
| { |